本文整理匯總了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);