Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// main entry point
import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppComponent } from './app.component';
import { APP_ROUTER_PROVIDERS } from './app.routes';
import { DataService } from './global/data.service';
import * as meta from './meta';
console.log("%c" + meta.consoleTag, 'font-style: italic; font-size: 20px;');
console.log("%c" + meta.urls.github, "color: blue; font-style: italic; text-decoration: underline; background-color: #FFFF00;");
console.group();
enableProdMode();
bootstrap(AppComponent, [
APP_ROUTER_PROVIDERS,
DataService
])
.catch(err => console.error(err));
export function main(initialHmrState?: any): Promise {
return bootstrap(App, [
// To add more vendor providers please look in the platform/ folder
...PLATFORM_PROVIDERS,
...ENV_PROVIDERS,
...APP_PROVIDERS,
...AUTH_PROVIDERS
])
.then(decorateComponentRef)
.catch(err => console.error(err));
}
this.bricks.push(lorem[index]);
}
removeRandomItem() {
var index = Math.floor(Math.random() * (this.bricks.length - 1));
this.bricks.splice(index, 1);
}
clearItems() {
this.bricks = [];
}
}
bootstrap(AppComponent);
// Demo content
var lorem = [
{ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis nec venenatis eros. Maecenas sollicitudin pharetra orci quis mattis. Morbi non.' },
{ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer pharetra blandit ultricies. Quisque at dapibus elit. Nullam pharetra lorem et.' },
{ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ipsum tortor, pellentesque quis feugiat et, lacinia sit amet lorem. Morbi pulvinar diam fermentum urna elementum, eu mollis urna rutrum. Donec vel neque malesuada, porta erat et, laoreet turpis. Curabitur vel porta elit, sed molestie elit. Phasellus scelerisque scelerisque lectus, sed.' },
{ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque commodo neque tempor, aliquam odio a, sollicitudin lacus. Morbi ut justo nisi. Quisque convallis, nisl ac gravida semper, nisi turpis maximus felis, non gravida ex mi eu metus. Vestibulum semper venenatis viverra. Nulla volutpat lacinia scelerisque. Nunc efficitur dolor non imperdiet.' },
{ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sit amet odio aliquam, egestas urna non, vehicula dui. In at rhoncus erat. Maecenas convallis porta enim et varius. Nulla ut.' },
{ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pretium.' },
{ text: 'Lorem ipsum dolor sit amet.' },
{ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque aliquam.' },
{ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent rutrum metus id faucibus placerat. Sed at fermentum dolor, id ultricies.' },
{ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur et erat tempus, varius dolor at, congue erat. Donec scelerisque ullamcorper.' },
{ image: 'http://lorempixel.com/250/200/abstract' },
{ image: 'http://lorempixel.com/250/300/abstract' },
// Imports for loading & configuring the in-memory web api
var http_1 = require('@angular/http');
var icon_registry_1 = require('@angular2-material/icon/icon-registry');
var auth_guard_1 = require('./auth.guard');
var forms_1 = require('@angular/forms');
var angularfire2_1 = require('angularfire2');
// The usual bootstrapping imports
var platform_browser_dynamic_1 = require('@angular/platform-browser-dynamic');
var platform_browser_1 = require('@angular/platform-browser');
var app_component_1 = require('./app.component');
var app_routes_1 = require('./app.routes');
var charts_service_1 = require('./charts/charts.service');
var spinner_service_1 = require('./shared/spinner/spinner.service');
var log_service_1 = require('./shared/log/log.service');
var index_1 = require('./shared/config/index'); // TODO: check why barrel does not work?
platform_browser_dynamic_1.bootstrap(app_component_1.AppComponent, [
app_routes_1.APP_ROUTER_PROVIDER,
http_1.HTTP_PROVIDERS,
angularfire2_1.FIREBASE_PROVIDERS,
// Initialize Firebase app
angularfire2_1.defaultFirebase({
apiKey: "AIzaSyBxTIFIwi_rWHM3oeAtXSEi1nrEUvvlqu8",
authDomain: "investsystemsorg.firebaseapp.com",
databaseURL: "https://investsystemsorg.firebaseio.com",
storageBucket: "investsystemsorg.appspot.com",
}),
angularfire2_1.firebaseAuthConfig({
provider: angularfire2_1.AuthProviders.Google,
method: angularfire2_1.AuthMethods.Redirect
}),
// { provide: XHRBackend, useClass: InMemoryBackendService }, // in-mem server
// { provide: SEED_DATA, useClass: InMemoryDataService }, // in-mem server data
addTodo(label) {
this.todos.push({
label,
completed: false
})
}
removeTodo(idx) {
this.todos.splice(idx, 1);
}
toggleCompletion(idx) {
let todo = this.todos[idx];
todo.completed = !todo.completed;
}
}
bootstrap(TodoCtrl);
path: '/detail/:id',
name: 'HeroDetail',
component: HeroDetailComponent
},
{
path: '/heroes',
name: 'Heroes',
component: HeroesComponent
}
])
export class AppComponent {
title:string = 'Tour of Heroes';
}
bootstrap(AppComponent);
"use strict";
var platform_browser_dynamic_1 = require('@angular/platform-browser-dynamic');
var app_component_1 = require('./app.component');
platform_browser_dynamic_1.bootstrap(app_component_1.AppComponent);
//# sourceMappingURL=main.js.map
import {bootstrap} from '@angular/platform-browser-dynamic'
import {AppComponent} from './app.component'
import {Http, HTTP_PROVIDERS} from '@angular/http'
import {LoginService} from './service/login'
import {HeadersService} from './service/headers'
bootstrap(AppComponent,[HeadersService, HTTP_PROVIDERS, LoginService]);
export function main(): Promise> {
return bootstrap(AppCmp, [
{provide: APP_BASE_HREF, useValue: '/@angular/examples/router/ts/on_deactivate'}, LogService
]);
}
import { bootstrap } from '@angular/platform-browser-dynamic';
import { AppComponent } from './app.component';
bootstrap(AppComponent);