Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Component({
- selector: 'hello',
- template: `<h1>Hello {{name}}!</h1>`,
- changeDetection: ChangeDetectionStrategy.OnPush <========
- })
- export class HelloComponent {
- _name;
- @Input() set name(name: string) {
- this._name = name;
- }
- get name() {
- return this._name;
- }
- }
Add Comment
Please, Sign In to add comment