I am trying to figure out what the difference is between @Component and @View in AngularJS 2.
Within the 2 following examples I can achieve the exact same thing.
Example without @View:
import {Component} from 'angular2/core';
@Component({
selector: 'di-prototype',
template: `
<h1>AngularJS 2 Prototype</h1>
`
})
export class DiPrototype {
}
Example with @View:
import {Component, View} from 'angular2/core';
@Component({
selector: 'di-prototype'
})
@View({
template: `
<h1>AngularJS 2 Prototype</h1>
`
})
export class DiPrototype {
}