mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-05 13:09:03 +08:00
14 lines
246 B
TypeScript
14 lines
246 B
TypeScript
import { Component, signal } from "@angular/core";
|
|
|
|
@Component({
|
|
selector: "app-name",
|
|
template: `<h1>你好 {{ name() }}</h1>`,
|
|
})
|
|
export class NameComponent {
|
|
name = signal("张三");
|
|
|
|
constructor() {
|
|
this.name.set("李四");
|
|
}
|
|
}
|