本文整理汇总了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);
});
});
示例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;
});
示例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));
});
示例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
];
示例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()
]
)
示例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);