Hi. I\'m new to Angular. I\'m testing Angular 2.0.
I read the tuto here and the guide here. In the tuto, the template is specified in the @Component ann
First of all, this was deprecated and now fully gone!
2.0.0-beta.10 (2016-03-17): @View() annotation (previously deprecated) has been removed. Apps should use the @Component() decorator instead.
So you don't need to worry about it anymore, The @View was previously introduced because the early thinking was that there could be multiple views in a component (like a mobile view for example) and the usage was as below:
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
styleUrls: ['./app.component.scss']})
@View({
media: 'desktop',
template: 'tablet'
})
@View({
media: 'mobile',
template: 'mobile'
})
extends class Component() {}