当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript LocalStorageEmitter.LocalStorageSubscriber函数代码示例

本文整理汇总了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);
开发者ID:guillezc,项目名称:questions,代码行数:30,代码来源:main.ts

示例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);
开发者ID:SeanNguyen,项目名称:ng2-todo-list,代码行数:16,代码来源:index.ts


注:本文中的angular2-localstorage/LocalStorageEmitter.LocalStorageSubscriber函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。