Angular 2 Difference between @view and @component template -


this question has answer here:

in angular 2, i'm looking explanation on difference between

@component ({    selector: 'test-component',    template: '<div>hello world</div>' }) 

and

@component ({    selector: 'test-component', })  @view ({     template: '<div>hello world</div>' }) 

i have tried creating 2 components 2 different approaches , both seem behave same. clarification helpful.

i think should have @ question: angular 2.0. difference @view @component.

in fact, it's same since view optional in future, able define several views same component.

hope helps you, thierry


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

React Native allow user to reorder elements in a scrollview list -

multithreading - Exception in Application constructor -