Created
February 9, 2018 13:29
-
-
Save petyosi/84914561eab4a41bcfb69fc7392c9125 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// boot.ts | |
import {platformBrowserDynamic} from "@angular/platform-browser-dynamic"; | |
import {enableProdMode} from "@angular/core"; | |
import {AppModule} from "./app.module"; | |
declare var process; | |
if (process.env.ENV === 'production') { | |
enableProdMode(); | |
} | |
platformBrowserDynamic().bootstrapModule(AppModule); | |
// app.module.ts | |
import {NgModule} from "@angular/core"; | |
import {BrowserModule} from "@angular/platform-browser"; | |
// application | |
import {AppComponent} from "./app.component"; | |
@NgModule({ | |
imports: [ | |
BrowserModule | |
], | |
declarations: [ | |
AppComponent | |
], | |
bootstrap: [AppComponent] | |
}) | |
export class AppModule { | |
} | |
// app.component.ts | |
import {Component} from "@angular/core"; | |
@Component({ | |
selector: 'my-app', | |
template: ` | |
Hello {{ name }} | |
` | |
}) | |
export class AppComponent { | |
name: string = "Sean"; | |
constructor() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment