本文整理汇总了TypeScript中angular2-localstorage/LocalStorageEmitter.LocalStorageSubscriber函数的典型用法代码示例。如果您正苦于以下问题:TypeScript LocalStorageSubscriber函数的具体用法?TypeScript LocalStorageSubscriber怎么用?TypeScript LocalStorageSubscriber使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LocalStorageSubscriber函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: enableProdMode
}
}
enableProdMode();
var appPromise = bootstrap(MainComponent, [
appRouterProviders,
FIREBASE_PROVIDERS,
defaultFirebase({
apiKey: "AIzaSyCTfrqErjXXuOPAPWK4AOJBLu3tg2-dJx8",
authDomain: "events-7d50b.firebaseapp.com",
databaseURL: "https://events-7d50b.firebaseio.com",
storageBucket: "events-7d50b.appspot.com"
/*apiKey: "AIzaSyB5ZUgBJabSy-F18lNUiyqmb0xy72oFCx4",
authDomain: "questions-16537.firebaseapp.com",
databaseURL: "https://questions-16537.firebaseio.com",
storageBucket: "questions-16537.appspot.com",*/
}),
firebaseAuthConfig({
provider: AuthProviders.Anonymous,
method: AuthMethods.Anonymous
}),
{provide: LocationStrategy, useClass: HashLocationStrategy},
{provide: Logger, useClass: Logger},
disableDeprecatedForms(),
provideForms(),
{provide: PLATFORM_DIRECTIVES, useValue: [REACTIVE_FORM_DIRECTIVES], multi: true},
Title
]).catch(err => console.error(err));
LocalStorageSubscriber(appPromise);
示例2: bootstrap
/**
* Created by seann on 22/6/2016.
*/
import { bootstrap } from "@angular/platform-browser-dynamic"
import {TodoApp} from './app';
import {APP_ROUTER_PROVIDERS} from "./app.routes";
import {LocationStrategy, HashLocationStrategy} from "@angular/common";
import {LocalStorageService, LocalStorageSubscriber} from 'angular2-localstorage/LocalStorageEmitter';
var todoApp = bootstrap(TodoApp, [
APP_ROUTER_PROVIDERS,
{ provide: LocationStrategy, useClass: HashLocationStrategy },
LocalStorageService
]).catch(err => console.error(err));
LocalStorageSubscriber(todoApp);