當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。