Update angularLocalStorage-tests.ts

This commit is contained in:
Basarat Ali Syed
2015-03-12 11:57:23 +11:00
parent e4accde904
commit 36e55ab5f7
@@ -5,20 +5,18 @@ interface TestScope extends ng.IScope {
viewType: string;
}
module angular.LocalStorageTests {
export class TestController {
constructor(private $scope: TestScope, private storage: ng.localStorage.ILocalStorageService) {
storage.bind($scope, 'varName');
storage.bind($scope,'varName', { defaultValue: 'randomValue123', storeName: 'customStoreKey' });
$scope.viewType = 'ANYTHING';
storage.unbind($scope, 'viewType');
export class TestController {
constructor(private $scope: TestScope, private storage: ng.localStorage.ILocalStorageService) {
storage.bind($scope, 'varName');
storage.bind($scope,'varName', { defaultValue: 'randomValue123', storeName: 'customStoreKey' });
$scope.viewType = 'ANYTHING';
storage.unbind($scope, 'viewType');
storage.set('key', 'value');
storage.get('key');
storage.remove('key');
storage.set('key', 'value');
storage.get('key');
storage.remove('key');
storage.clearAll();
}
storage.clearAll();
}
}