How to use the angular2/platform/browser.bootstrap function in angular2

To help you get started, we’ve selected a few angular2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jhades / blog.angular-university.io / ng2-rxjs / src / main.ts View on Github external
@Component({
    selector: 'app',
    template: `
    
    
    <footer></footer>
  `,
    directives: [AddTodo, TodoList, Footer],
    providers: stateAndDispatcher
})
class TodoApp {
}

enableProdMode(); // due to https://github.com/angular/angular/pull/5996
bootstrap(TodoApp)
    .catch(err =&gt; console.error(err));
github bradyhouse / house / fiddles / angular2 / fiddle-0024-Dashboard / src / boot.ts View on Github external
import {bootstrap} from 'angular2/platform/browser';
import {enableProdMode} from 'angular2/core';
import {App} from './App';
import * as meta from './meta';
import * as core from 'angular2/core';

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();

declare var ag: any;
ag.grid.initialiseAgGridWithAngular2({ core: core });

enableProdMode();
bootstrap(App)
    .catch(err => console.error(err));
github Farata / angular2typescript / chapter2 / directive-example / index.ts View on Github external
}
})
class LogDirective {
  onInput(event) {
    console.log(event.target.value);
  }
}

@Component({
  selector: 'directive-example',
  directives: [LogDirective],
  template: '<input type="text">'
})
class DirectiveExample {}

bootstrap(DirectiveExample);
github contentful-labs / product-catalogue-web.ts / app.ts View on Github external
import {bootstrap} from 'angular2/platform/browser';
import {HTTP_PROVIDERS} from 'angular2/http';
import {ROUTER_PROVIDERS, LocationStrategy, HashLocationStrategy} from 'angular2/router';
import {enableProdMode, provide} from 'angular2/core';

import {ContentfulService} from './app/services/contentful-service';
import {ProductCatalogueApp} from './app/prouduct-catalogue-app';

enableProdMode();

bootstrap(ProductCatalogueApp,
    [HTTP_PROVIDERS, ROUTER_PROVIDERS, provide(LocationStrategy, {useClass: HashLocationStrategy}), ContentfulService])
    .catch(err => console.error(err));
github SekibOmazic / angular2-store-example / src / main.ts View on Github external
document.addEventListener('DOMContentLoaded', function main() {
  bootstrap(App, [
    ('production' === process.env.ENV ? [] : ELEMENT_PROBE_PROVIDERS),
    HTTP_PROVIDERS,
    ROUTER_PROVIDERS,
    provide(LocationStrategy, { useClass: HashLocationStrategy }),
    provideStore({ users }),
    API_PROVIDERS
  ])
  .catch(err => console.error(err));
});
github hagata / 30daysofHelloWorld / Day-09-Angular-2-with-TS / app / boot.ts View on Github external
import {bootstrap}    from 'angular2/platform/browser'
import {AppComponent} from './app.component'

bootstrap(AppComponent);
github kiswa / angular2-base / src / app / boot.ts View on Github external
///

import { bootstrap } from 'angular2/platform/browser';
//import { enableProdMode } from 'angular2/core';

import { AppComponent } from './app';

//enableProdMode();
bootstrap(AppComponent);
github NablaT / angular2gen / app / templates / src / _main.ts View on Github external
import {bootstrap}    from 'angular2/platform/browser';
import {AppComponent} from './components/app/app.component';
import {ROUTER_PROVIDERS} from 'angular2/router';

bootstrap(AppComponent, [
    ROUTER_PROVIDERS
]);
github tpadjen / ng2-prism / jspm_packages / npm / angular2@2.0.0-beta.12 / es6 / dev / examples / core / pipes / ts / lowerupper_pipe / lowerupper_pipe_example.js View on Github external
export function main() {
    bootstrap(AppCmp);
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG93ZXJ1cHBlcl9waXBlX2V4YW1wbGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhbmd1bGFyMi9leGFtcGxlcy9jb3JlL3BpcGVzL3RzL2xvd2VydXBwZXJfcGlwZS9sb3dlcnVwcGVyX3BpcGVfZXhhbXBsZS50cyJdLCJuYW1lcyI6WyJMb3dlclVwcGVyUGlwZUV4YW1wbGUiLCJMb3dlclVwcGVyUGlwZUV4YW1wbGUuY2hhbmdlIiwiQXBwQ21wIiwibWFpbiJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O09BQU8sRUFBQyxTQUFTLEVBQVUsTUFBTSxlQUFlO09BQ3pD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9wPlxuICAgIDxwPkluIHVwcGVyY2FzZTogPHByZT4ne3t2YWx1ZSB8IHVwcGVyY2FzZX19JzwvcHJlPjwvcD5cbiAgPC9kaXY+YFxufSlcbmV4cG9ydCBjbGFzcyBMb3dlclVwcGVyUGlwZUV4YW1wbGUge1xuICB2YWx1ZTogc3RyaW5nO1xuICBjaGFuZ2UodmFsdWU6IHN0cmluZykgeyB0aGlzLnZhbHVlID0gdmFsdWU7IH1cbn1cbi8vICNlbmRkb2NyZWdpb25cblxuQENvbXBvbmVudCh7XG4gIHNlbGVjdG9yOiAnZXhhbXBsZS1hcHAnLFxuICBkaXJlY3RpdmVzOiBbTG93ZXJVcHBlclBpcGVFeGFtcGxlXSxcbiAgdGVtcGxhdGU6IGBcbiAgICA8aDE+TG93ZXJjYXNlUGlwZSAmYW1wOyBVcHBlcmNhc2VQaXBlIEV4YW1wbGU8L2gxPlxuICAgIDxsb3dlcnVwcGVyLWV4YW1wbGU+PC9sb3dlcnVwcGVyLWV4YW1wbGU+XG4gIGBcbn0pXG5leHBvcnQgY2xhc3MgQXBwQ21wIHtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG1haW4oKSB7XG4gIGJvb3RzdHJhcChBcHBDbXApO1xufVxuIl19
github spderosso / deja-vu / catalog / access / auth / src / dev / boot.ts View on Github external
import {provide} from "angular2/core";
import {bootstrap} from "angular2/platform/browser";
import {AuthPatternComponent} from "./auth-pattern.component";

import "rxjs/add/operator/map";
import "rxjs/add/operator/mergeMap";
import "rxjs/add/observable/fromArray";


const APIS = {auth: "http://localhost:3000"};


bootstrap(
  AuthPatternComponent, [
    provide("auth.api", {useValue: APIS.auth})
  ]);