mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
24 lines
660 B
TypeScript
24 lines
660 B
TypeScript
/// <reference path='../angularjs/angular.d.ts' />
|
|
/// <reference path='angular-dynamic-locale.d.ts' />
|
|
|
|
var app = angular.module('testModule', ['tmh.dynamicLocale']);
|
|
app.config((localStorageServiceProvider: angular.dynamicLocale.tmhDynamicLocaleProvider) => {
|
|
localStorageServiceProvider
|
|
.localeLocationPattern("app/config/locales/")
|
|
.useCookieStorage();
|
|
});
|
|
|
|
class LocaleTestController {
|
|
|
|
constructor(tmhDynamicLocaleService: angular.dynamicLocale.tmhDynamicLocaleService) {
|
|
|
|
var locale = tmhDynamicLocaleService.get();
|
|
|
|
var newLocale = "mt"
|
|
tmhDynamicLocaleService.set(newLocale);
|
|
}
|
|
|
|
}
|
|
|
|
app.controller('TestController', LocaleTestController);
|