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

TypeScript application.nativeScriptBootstrap函数代码示例

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

本文整理汇总了TypeScript中nativescript-angular/application.nativeScriptBootstrap函数的典型用法代码示例。如果您正苦于以下问题:TypeScript nativeScriptBootstrap函数的具体用法?TypeScript nativeScriptBootstrap怎么用?TypeScript nativeScriptBootstrap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了nativeScriptBootstrap函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: nativeScriptBootstrap

ďťżimport { nativeScriptBootstrap } from "nativescript-angular/application";

import {MainPage} from "./main-page";

nativeScriptBootstrap(MainPage);
开发者ID:TheOriginalJosh,项目名称:ngSample,代码行数:5,代码来源:app.ts


示例2: nativeScriptBootstrap

import "reflect-metadata";
import {nativeScriptBootstrap} from "nativescript-angular/application";
import {NS_HTTP_PROVIDERS} from "nativescript-angular/http";
import {AppComponent} from "./app.component";
import {APP_ROUTER_PROVIDERS} from "./app.routes";

nativeScriptBootstrap(AppComponent, [NS_HTTP_PROVIDERS, APP_ROUTER_PROVIDERS]);
开发者ID:flai78,项目名称:PoolManagerApp,代码行数:7,代码来源:main.ts


示例3: setStatusBarColors

import {nativeScriptBootstrap} from "nativescript-angular/application";
import {AppComponent} from "./app.component";
import {setStatusBarColors} from "./utils/status-bar-util";

setStatusBarColors();

nativeScriptBootstrap(AppComponent, null, { startPageActionBarHidden: false });
开发者ID:NathanWalker,项目名称:nativescript-couchbase,代码行数:7,代码来源:main.ts


示例4: nativeScriptBootstrap

import "reflect-metadata";
import {nativeScriptBootstrap} from "nativescript-angular/application";
import {AppComponent} from "./app.component";
import {APP_ROUTER_PROVIDERS} from "./app.routes";

nativeScriptBootstrap(AppComponent, [ APP_ROUTER_PROVIDERS]);
开发者ID:samueldaviddelacruz,项目名称:AndroidPractices,代码行数:6,代码来源:main.ts


示例5: function

import * as elementRegistryModule from 'nativescript-angular/element-registry';
// >> using-global-directives
import { nativeScriptBootstrap } from "nativescript-angular/application";
import { SIDEDRAWER_PROVIDERS } from "nativescript-telerik-ui-pro/sidedrawer/angular";
import { LISTVIEW_PROVIDERS } from 'nativescript-telerik-ui-pro/listview/angular';
import { CALENDAR_PROVIDERS } from 'nativescript-telerik-ui-pro/calendar/angular';
import { CHART_PROVIDERS } from 'nativescript-telerik-ui-pro/chart/angular';
import { AppComponent } from "./navigation/app.component";
import { APP_ROUTER_PROVIDERS } from "./navigation/app.routes";
import { NS_ROUTER_PROVIDERS } from "nativescript-angular/router";
import { RouterOutletMap } from '@angular/router';

// Not required imports, these are used by the nativescript-samples-angular SDK examples
import { OptionsService } from "./navigation/options/options.service";
import { ExampleItemService } from "./navigation/exampleItemService.service";
// >> (hide)
import * as frescoModule from "nativescript-fresco";
import * as applicationModule from "application";

if (applicationModule.android) {
    applicationModule.onLaunch = function (intent) {
        frescoModule.initialize();
    };
}
elementRegistryModule.registerElement("FrescoDrawee", () => frescoModule.FrescoDrawee);
// << (hide)

nativeScriptBootstrap(AppComponent, [LISTVIEW_PROVIDERS, SIDEDRAWER_PROVIDERS, CALENDAR_PROVIDERS, CHART_PROVIDERS, 
                                        APP_ROUTER_PROVIDERS, OptionsService, ExampleItemService, NS_ROUTER_PROVIDERS, RouterOutletMap], 
                                    { startPageActionBarHidden: false });
// << using-global-directives
开发者ID:drejohnson,项目名称:nativescript-ui-samples-angular,代码行数:31,代码来源:app.ts


示例6: nativeScriptBootstrap

// this import should be first in order to load some required settings (like globals and reflect-metadata)
import {nativeScriptBootstrap} from "nativescript-angular/application";
import {RouterOutletAppComponent, RouterOutletRouterProviders} from "./app.component";
import {HTTP_PROVIDERS} from "@angular/http";

nativeScriptBootstrap(RouterOutletAppComponent, [HTTP_PROVIDERS, RouterOutletRouterProviders]);
开发者ID:nithinshiriya,项目名称:NativescriptAngularStarter,代码行数:6,代码来源:main.ts


示例7: nativeScriptBootstrap

// this import should be first in order to load some required settings (like globals and reflect-metadata)
import { nativeScriptBootstrap } from "nativescript-angular/application";

import {MainPage} from "./main-page";
import {HTTP_PROVIDERS} from 'angular2/http';

nativeScriptBootstrap(MainPage, [HTTP_PROVIDERS], { startPageActionBarHidden: true });
开发者ID:thinkblue36,项目名称:nativescript-http-rxjs,代码行数:7,代码来源:app.ts


示例8: require

import {nativeScriptBootstrap} from "nativescript-angular/application";
import elementRegistry = require('nativescript-angular/element-registry');
import {FrescoDrawee} from "fresco/fresco";
// >> using-global-directives
import {SIDEDRAWER_PROVIDERS} from "nativescript-telerik-ui-pro/sidedrawer/angular/side-drawer-directives";
import {LISTVIEW_PROVIDERS} from 'nativescript-telerik-ui-pro/listview/angular/listview-directives';
import {MainComponent} from "./main/main.component";
// >> (hide)
import * as applicationModule from "application";

if (applicationModule.android) {
    applicationModule.onLaunch = function (intent) {
        com.facebook.drawee.backends.pipeline.Fresco.initialize(applicationModule.android.context);
    };
}
elementRegistry.registerElement("FrescoDrawee", () => FrescoDrawee);
// << (hide)
nativeScriptBootstrap(MainComponent, [LISTVIEW_PROVIDERS, SIDEDRAWER_PROVIDERS]);
// << using-global-directives
开发者ID:ThinkUpStudios,项目名称:app-template-drawer-native,代码行数:19,代码来源:main.ts


示例9: require

CoreConfigService.PLATFORM_TARGET = CoreConfigService.PLATFORMS.MOBILE_NATIVE;
CoreConfigService.DEBUG.LEVEL_4 = true;
CoreConfigService.ROUTER_DIRECTIVES = NS_ROUTER_DIRECTIVES;

// app
import {NS_APP_PROVIDERS} from './shared/nativescript/index';
import {routes} from './app/components/app/app.routes';
import {NSAppComponent} from './pages/app/app.component';
import {WindowNative, ModalNative, NSHttpService, NSDatabaseService} from './shared/core/index';
  
// Uncomment when ready to publish to App Stores:
// enableProdMode();

var firebase = require('nativescript-plugin-firebase');

nativeScriptBootstrap(NSAppComponent, [
  provide(WindowService, { useClass: WindowNative }),
  ModalNative,
  provide(HttpService, { useClass: NSHttpService }),
  provide(FIREBASE, { useValue: firebase }),
  provide(DatabaseService, { useClass: NSDatabaseService }),
//  NS_ROUTER_PROVIDERS,
  provide(TranslateLoader, {
    useFactory: () => {
      return new TNSTranslateLoader('assets/i18n');
    }
  }),
  NS_APP_PROVIDERS,
  nsProvideRouter(routes, { enableTracing: false })
]);
开发者ID:BlackMr,项目名称:angular2seed2new,代码行数:30,代码来源:app.ts


示例10: require

import {nativeScriptBootstrap}          from 'nativescript-angular/application';
import {APP_ROUTER_PROVIDERS}           from './app.routes';
import {AppComponent}                   from './app.component';
import {PlaylistService}                from './shared/services/playlist.service';
import {LastFmService}                  from './shared/services/lastfm.service';
// See: https://github.com/NativeScript/nativescript-angular/issues/345
import {HTTP_PROVIDERS}                 from '@angular/http';
import {NS_HTTP_PROVIDERS}              from 'nativescript-angular/http';
require('nativescript-orientation');

// See: https://github.com/NativeScript/nativescript-angular/issues/345 and
// https://github.com/NativeScript/nativescript-angular/wiki/Http
nativeScriptBootstrap(AppComponent, [APP_ROUTER_PROVIDERS, NS_HTTP_PROVIDERS, PlaylistService, LastFmService]);
开发者ID:mikeybyker,项目名称:nativescript-playlist,代码行数:13,代码来源:main.ts



注:本文中的nativescript-angular/application.nativeScriptBootstrap函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
TypeScript dialogs.ModalDialogParams类代码示例发布时间:2022-05-25
下一篇:
TypeScript application.bootstrap函数代码示例发布时间: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