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