All of the properties of the @View
annotation are also present in @Component
. Earlier examples used both, but since beta.8 (and maybe earlier) the code samples on angular.io website only use @Component
. Is this the preferred way of creating components?
I am pretty sure that the @View
decorator will be removed. You can use the template
key in the @Component
decorator to specify the view template. Also when you look for @View
in the docs you can see that the example is not in line with what is written https://angular.io/docs/ts/latest/api/core/View-decorator.html
To me it highly suggests that it is going to be removed.
update
@View()
is about to be removed https://github.com/angular/angular/pull/7495
It's not sure @View
will stay supported. They discussed removing it. As far as I know they still plan to add support for multiple views but it's not decided yet how the approach will look like.
See also https://github.com/angular/angular/issues/7363
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With