當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript application.nativeScriptBootstrap函數代碼示例

本文整理匯總了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;未經允許,請勿轉載。