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


TypeScript IonicStorageModule.forRoot方法代码示例

本文整理汇总了TypeScript中@ionic/storage.IonicStorageModule.forRoot方法的典型用法代码示例。如果您正苦于以下问题:TypeScript IonicStorageModule.forRoot方法的具体用法?TypeScript IonicStorageModule.forRoot怎么用?TypeScript IonicStorageModule.forRoot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@ionic/storage.IonicStorageModule的用法示例。


在下文中一共展示了IonicStorageModule.forRoot方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: beforeEach

  beforeEach(async(() => {
    eventsSpy = jasmine.createSpyObj('Events', ['subscribe']);
    menuSpy = jasmine.createSpyObj('MenuController', ['toggle', 'enable']);
    routerSpy = jasmine.createSpyObj('Router', ['navigateByUrl']);
    userDataSpy = jasmine.createSpyObj('UserData', ['isLoggedIn', 'logout']);
    statusBarSpy = jasmine.createSpyObj('StatusBar', ['styleDefault']);
    splashScreenSpy = jasmine.createSpyObj('SplashScreen', ['hide']);
    platformReadySpy = Promise.resolve();
    platformSpy = jasmine.createSpyObj('Platform', { ready: platformReadySpy });

    TestBed.configureTestingModule({
      declarations: [AppComponent],
      imports: [IonicStorageModule.forRoot()],
      schemas: [CUSTOM_ELEMENTS_SCHEMA],
      providers: [
        { provide: Events, useValue: eventsSpy },
        { provide: MenuController, useValue: menuSpy },
        { provide: Router, useValue: routerSpy },
        { provide: UserData, useValue: userDataSpy },
        { provide: StatusBar, useValue: statusBarSpy },
        { provide: SplashScreen, useValue: splashScreenSpy },
        { provide: Platform, useValue: platformSpy }
      ]
    }).compileComponents();
  }));
开发者ID:imjohnbo,项目名称:ionic-conference-app,代码行数:25,代码来源:app.component.spec.ts

示例2: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [TranslateModule.forRoot(), IonicStorageModule.forRoot()],
     declarations: [SettingsPage],
     schemas: [CUSTOM_ELEMENTS_SCHEMA],
     providers: [Network]
   }).compileComponents();
 }));
开发者ID:strandls,项目名称:biodiv-mobile,代码行数:8,代码来源:settings.page.spec.ts

示例3: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [ReactiveFormsModule, TranslateModule.forRoot(), IonicStorageModule.forRoot(), RouterTestingModule.withRoutes([])],
     declarations: [LoginPage],
     schemas: [CUSTOM_ELEMENTS_SCHEMA],
     providers: [HttpClient, HttpHandler, HTTP, Network, GooglePlus]
   }).compileComponents();
 }));
开发者ID:strandls,项目名称:biodiv-mobile,代码行数:8,代码来源:login.page.spec.ts

示例4: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       IonicStorageModule.forRoot(),
       TranslateModule.forRoot(),
       RouterTestingModule.withRoutes([])
     ],
     declarations: [LogoutPage],
     schemas: [CUSTOM_ELEMENTS_SCHEMA]
   }).compileComponents();
 }));
开发者ID:strandls,项目名称:biodiv-mobile,代码行数:11,代码来源:logout.page.spec.ts

示例5: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     imports: [
       TranslateModule.forRoot(),
       PipesModule,
       IonicStorageModule.forRoot(),
       RouterTestingModule.withRoutes([])
     ],
     declarations: [ObservationsPage],
     schemas: [CUSTOM_ELEMENTS_SCHEMA],
     providers: [HttpClient, HttpHandler, HTTP, Network, File]
   }).compileComponents();
 }));
开发者ID:strandls,项目名称:biodiv-mobile,代码行数:13,代码来源:observations.page.spec.ts

示例6: beforeEach

  beforeEach(async(() => {
    const menuSpy = jasmine.createSpyObj('MenuController', [
      'toggle',
      'enable'
    ]);
    const routerSpy = jasmine.createSpyObj('Router', ['navigateByUrl']);

    TestBed.configureTestingModule({
      declarations: [TutorialPage],
      schemas: [CUSTOM_ELEMENTS_SCHEMA],
      imports: [IonicStorageModule.forRoot()],
      providers: [
        { provide: MenuController, useValue: menuSpy },
        { provide: Router, useValue: routerSpy }
      ]
    }).compileComponents();
  }));
开发者ID:imjohnbo,项目名称:ionic-conference-app,代码行数:17,代码来源:tutorial.spec.ts

示例7: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [
       MyApp,
       HomePage,
       WelcomePage,
       InfoPage,
       ScanSessionContextMenuPopover,
       QrCodePairingModal,
       MainMenuPopover,
       SettingsPage,
     ],
     imports: [
       BrowserModule,
       IonicStorageModule.forRoot(),
       QRCodeModule,
       ClipboardModule,
       DragulaModule.forRoot(),
       IonicModule.forRoot(MyApp,
         {
           // mode: 'wp',
           // iconMode: 'ios',
           // modalEnter: 'modal-slide-in',
           // modalLeave: 'modal-slide-out',
           // activator: 'highlight',
           // pageTransition: 'wp-transition',
         }),
       ComponentsModule,
     ],
     providers: [
       StatusBar,
       SplashScreen,
       { provide: ErrorHandler, useClass: IonicErrorHandler },
       ElectronProvider,
       StorageProvider,
       UtilsProvider,
       ConfigProvider
     ]
   })
 }));
开发者ID:jazzkell,项目名称:barcode-to-pc-server,代码行数:40,代码来源:app.component.spec.ts

示例8: beforeEach

  beforeEach(async(() => {
    statusBarSpy = jasmine.createSpyObj("StatusBar", ["styleDefault", "backgroundColorByHexString", "overlaysWebView"]);
    splashScreenSpy = jasmine.createSpyObj("SplashScreen", ["hide"]);
    platformReadySpy = Promise.resolve();
    platformSpy = jasmine.createSpyObj("Platform", { ready: platformReadySpy });

    TestBed.configureTestingModule({
      imports: [
        IonicStorageModule.forRoot(),
        TranslateModule.forRoot(),
        RouterTestingModule.withRoutes([])
      ],
      declarations: [AppComponent],
      schemas: [CUSTOM_ELEMENTS_SCHEMA],
      providers: [
        HTTP,
        Network,
        { provide: StatusBar, useValue: statusBarSpy },
        { provide: SplashScreen, useValue: splashScreenSpy },
        { provide: Platform, useValue: platformSpy }
      ]
    }).compileComponents();
  }));
开发者ID:strandls,项目名称:biodiv-mobile,代码行数:23,代码来源:app.component.spec.ts

示例9: beforeEach

 beforeEach(() =>
   TestBed.configureTestingModule({
     imports: [IonicStorageModule.forRoot()],
     providers: [HttpClient, HttpHandler, HTTP, Network]
   })
开发者ID:strandls,项目名称:biodiv-mobile,代码行数:5,代码来源:http-request.service.spec.ts

示例10: beforeEach

 beforeEach(() =>
   TestBed.configureTestingModule({
     imports: [IonicStorageModule.forRoot()]
   })
开发者ID:strandls,项目名称:biodiv-mobile,代码行数:4,代码来源:basic-utils.service.spec.ts


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