2018-08-09 09:23:56 -04:00
|
|
|
import {Component, NgModule, ɵrenderComponent as renderComponent} from '@angular/core';
|
|
|
|
import {CommonModule} from '@angular/common';
|
2018-10-15 06:02:38 -04:00
|
|
|
import {MatButtonModule} from '@angular/material/button';
|
|
|
|
|
2018-08-09 09:23:56 -04:00
|
|
|
@Component({
|
|
|
|
selector: 'hello-world',
|
|
|
|
template: `
|
2018-10-15 06:02:38 -04:00
|
|
|
<button mat-button (click)="visible = true">See Message</button>
|
2018-08-09 09:23:56 -04:00
|
|
|
<h2 *ngIf="visible">Hello World</h2>
|
|
|
|
`,
|
|
|
|
})
|
|
|
|
class HelloWorld {
|
|
|
|
visible = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
declarations: [HelloWorld],
|
2018-10-15 06:02:38 -04:00
|
|
|
imports: [CommonModule, MatButtonModule],
|
2018-08-09 09:23:56 -04:00
|
|
|
})
|
|
|
|
class Module {}
|
|
|
|
|
|
|
|
renderComponent(HelloWorld);
|