Exploring Angular2 and TypeScript for the first time. Attempting examples like the one below:
@Component({
selector: 'counter',
template: `
{{ value }}
<button (click)="increase()">Increase</button>
<button (click)="decrease()">Decrease</button>
`
})
class Counter {
value: number;
constructor() {
this.value = 1;
}
increase() {
this.value = this.value + 1;
}
decrease() {
this.value = this.value - 1;
}
}
Encountering the "Cannot find name 'Component'" error during compilation.
Inquiring about the issue at hand. What steps should I take to resolve it?