Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
NS_ROUTER_PROVIDERS
];
config.providers = config.providers
? config.providers.concat(baseConfig)
: [baseConfig];
config.directives = config.directives
? config.directives.concat(NS_ROUTER_DIRECTIVES)
: [NS_ROUTER_DIRECTIVES];
annotations.push(new Component(config));
_reflect.defineMetadata('annotations', annotations, startingComponent);
nativeScriptBootstrap(startingComponent, config.providers, config.appOptions).then((appRef) => {
registerElements.forEach(element => {
// let injector = appRef.injector;
// let page: Page = injector.get(Page);
console.log("Add element: " + element.name);
registerElement(element.name, element.resolver)
});
// if(config.appStartup){
// config.appStartup(appRef);
// }
});
return startingComponent;
}
}
// this import should be first in order to load some required settings (like globals and reflect-metadata)
import {nativeScriptBootstrap} from "nativescript-angular/application";
import {HTTP_PROVIDERS} from '@angular/http';
require('nativescript-websockets'); // VERY IMPORTANT this comes BEFORE import of root component below!
import {AppComponent} from "./app.component";
nativeScriptBootstrap(AppComponent, [HTTP_PROVIDERS]);
"use strict";
// this import should be first in order to load some required settings (like globals and reflect-metadata)
var application_1 = require("nativescript-angular/application");
var app_component_1 = require("./app.component");
application_1.nativeScriptBootstrap(app_component_1.AppComponent, [], { startPageActionBarHidden: true });
//# sourceMappingURL=main.js.map
// this import should be first in order to load some required settings (like globals and reflect-metadata)
import {nativeScriptBootstrap} from "nativescript-angular/application";
import { CHART_PROVIDERS } from 'nativescript-telerik-ui-pro/chart/angular';
import {AppComponent} from "./app.component";
nativeScriptBootstrap(AppComponent, [CHART_PROVIDERS]);
// this import should be first in order to load some required settings (like globals and reflect-metadata)
import {nativeScriptBootstrap} from "nativescript-angular/application";
import * as appSettings from "application-settings";
import {TodoApp} from "./app.component";
/* Before we bootstrap, shim the 'localStorage' API with application settings module */
global.localStorage = {
getItem(key: string) {
return appSettings.getString(key);
},
setItem(key: string, value: string) {
return appSettings.setString(key, value);
}
}
nativeScriptBootstrap(TodoApp);
// this import should be first in order to load some required settings (like globals and reflect-metadata)
import {nativeScriptBootstrap} from "nativescript-angular/application";
import {AppComponent} from "./app.component";
nativeScriptBootstrap(AppComponent,[],{startPageActionBarHidden:true});
export function pageLoadedBindAngular(args) {
var page = args.object;
page.bindingContext = "";
if(!bootstrapPromise){
console.log('BOOTSTRAPPING...');
var promise = nativeScriptBootstrap(MainPage, [
ROUTER_PROVIDERS,
bind(LocationStrategy).toClass(NSLocationStrategy), //https://github.com/NativeScript/sample-Groceries/blob/710de30fdfe8640cabb489fb64ac02c1af894926/app/app-page.ts
provide(APP_BASE_HREF, {useValue : '/'})
]);
}
bootstrapPromise = promise
}
#titleLabel{
font-weight:bold;
font-size:30;
padding:5 15;
}
`]
})
class DemoComponent {
public message: string = "Your {N} + Angular 2 plugin is working."
constructor() { }
}
nativeScriptBootstrap(DemoComponent, []);
import { nativeScriptBootstrap } from 'nativescript-angular/application';
import { App } from './App';
nativeScriptBootstrap(App);
import {nativeScriptBootstrap} from "nativescript-angular/application";
import {AppComponent} from "./app.component";
import {setStatusBarColors} from "./utils/status-bar-util";
setStatusBarColors();
nativeScriptBootstrap(AppComponent);