當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ionic-angular.ionicProviders函數代碼示例

本文整理匯總了TypeScript中ionic-angular.ionicProviders函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript ionicProviders函數的具體用法?TypeScript ionicProviders怎麽用?TypeScript ionicProviders使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了ionicProviders函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: ionicProviders

 Meteor.startup(function() {
     // define array of bootstrap providers
     let providers = ionicProviders(args).concat(args.providers || [], METEOR_PROVIDERS);
     // bootstrap angular2
     bootstrap(cls, providers).then(appRef => {
         appRef.injector.get(TapClick);
         let app: IonicApp = appRef.injector.get(IonicApp);
         app.setProd(args.prodMode);
     });
 });
開發者ID:DFTinc,項目名稱:ionic2-meteor-onyx,代碼行數:10,代碼來源:meteor-ionic-app.ts

示例2: ionicProviders

 Meteor.startup(function() {
     // define array of bootstrap providers
     var providers = ionicProviders(args.providers).concat(args.providers || [], METEOR_PROVIDERS);
     // auto add Ionic directives
     let directives = args.directives ? args.directives.concat(IONIC_DIRECTIVES) : IONIC_DIRECTIVES;
     // automatically provide all of Ionic's directives to every component
     providers.push(provide(PLATFORM_DIRECTIVES, { useValue: [directives], multi: true }));
     if (args.prodMode) {
         enableProdMode();
     }
     ionicBootstrap(cls, providers, args.config);
     return cls;
 });
開發者ID:LeonidShamis,項目名稱:Ionic2-Meteor1.3-Starter,代碼行數:13,代碼來源:_meteor-ionic-app.ts

示例3: main

document.addEventListener('DOMContentLoaded', function main() {
    const defaultPlatform = Platform.get('core');
    defaultPlatform.settings.mode = 'md';
    return bootstrap(App, [
        // These are dependencies of our App
        ...HTTP_PROVIDERS,
        ...ROUTER_PROVIDERS,
        ...ENV_PROVIDERS,
        ...ionicProviders({})
        //provide(LocationStrategy, {useClass: HashLocationStrategy}) // use #/ routes, remove this for HTML5 mode
    ])
    .then(appRef => {
        appRef.injector.get(TapClick);
        let app = appRef.injector.get(IonicApp);
        app.setProd(isProd);
    })
    .catch(err => console.error(err));
});
開發者ID:jimitndiaye,項目名稱:angular2-webpack,代碼行數:18,代碼來源:bootstrap.ts

示例4: disableDeprecatedForms

// AngularClass
import { provideWebpack } from '@angularclass/webpack-toolkit';
import { providePrefetchIdleCallbacks } from '@angularclass/request-idle-callback';


import { routes, asyncRoutes, prefetchRouteCallbacks } from '../app/app.routes';
import { APP_RESOLVER_PROVIDERS } from '../app/app.resolver';

import { ionicProviders } from 'ionic-angular';
/*
* Application Providers/Directives/Pipes
* providers/directives/pipes that only live in our browser environment
*/
export const APPLICATION_PROVIDERS = [
  // new Angular 2 forms
  disableDeprecatedForms(),
  provideForms(),

  ...APP_RESOLVER_PROVIDERS,
  // provideRouter(routes),
  // provideWebpack(asyncRoutes),
  // providePrefetchIdleCallbacks(prefetchRouteCallbacks),
  ...HTTP_PROVIDERS,
  ...ionicProviders(),
  { provide: LocationStrategy, useClass: HashLocationStrategy }
];

export const PROVIDERS = [
  ...APPLICATION_PROVIDERS
];
開發者ID:jimitndiaye,項目名稱:ionic2test,代碼行數:30,代碼來源:browser-providers.ts

示例5: setBaseTestProviders

import { setBaseTestProviders } from "@angular/core/testing"
import {
  TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS,
  TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS
} from "@angular/platform-browser-dynamic/testing"
import { ionicProviders } from "ionic-angular"

setBaseTestProviders(
  TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
  [
    TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS,
    ionicProviders()
  ]
)
開發者ID:natevecc,項目名稱:ionic-unit-test-example,代碼行數:14,代碼來源:main.test.ts

示例6: ionicProviders

import {ComponentResolver, ReflectiveInjector, coreBootstrap} from '@angular/core';
import {BROWSER_APP_PROVIDERS, browserPlatform} from '@angular/platform-browser';
import {ionicProviders, ionicPostBootstrap} from 'ionic-angular';

import {AppNgFactory} from './app/app.ngfactory';

const providers = ionicProviders();
const appInjector = ReflectiveInjector.resolveAndCreate([BROWSER_APP_PROVIDERS, []], browserPlatform().injector);

const ngComponentRef = coreBootstrap(AppNgFactory, appInjector);
//ionicPostBootstrap(ngComponentRef);

開發者ID:jthoms1,項目名稱:tree-shake-ionic2,代碼行數:11,代碼來源:main.ts


注:本文中的ionic-angular.ionicProviders函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。