Created
August 31, 2018 15:46
-
-
Save riconegri/7a6934ebebc61d69a11c3acf94f91fb0 to your computer and use it in GitHub Desktop.
angular cmp to external load
This file contains 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
import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule, Component } from '@angular/core'; | |
@Component({ | |
selector: 'app-component', | |
template: ` | |
<button (click)="oi('oi')">{{button}}</button> | |
` | |
}) | |
class AppComponent{ | |
oi; | |
button = 'click me'; | |
oi(oi) { | |
this.oi = oi; | |
this.button = this.oi; | |
console.log(oi); | |
} | |
} | |
@NgModule({ | |
declarations: [ | |
AppComponent | |
], | |
imports: [ | |
BrowserModule | |
], | |
providers: [], | |
bootstrap: [AppComponent] | |
}) | |
export class AppModule { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment