mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-07 09:49:07 +00:00
Update angularLocalStorage-tests.ts
This commit is contained in:
@@ -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