当前位置: 首页>>代码示例>>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;未经允许,请勿转载。