• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript ionic-angular.ionicProviders函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript ionic-angular.ActionSheet类代码示例发布时间:2022-05-25
下一篇:
TypeScript ionic-angular.ionicBootstrap函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap