mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-05 04:59:02 +08:00
20 lines
339 B
TypeScript
20 lines
339 B
TypeScript
import { Component, NgModule } from "@angular/core";
|
|
|
|
@Component({
|
|
selector: "app-name",
|
|
template: `<h1>你好 {{ name }}</h1>`,
|
|
})
|
|
export class NameComponent {
|
|
name = "张三";
|
|
|
|
constructor() {
|
|
this.name = "李四";
|
|
}
|
|
}
|
|
|
|
@NgModule({
|
|
declarations: [NameComponent],
|
|
exports: [NameComponent],
|
|
})
|
|
export class NameModule {}
|