mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-13 12:22:02 +08:00
Update angularLocalStorage-tests.ts
This commit is contained in:
1 parent
e4accde904
commit
36e55ab5f7
1 file changed
+10
-12
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user