Saturday 21 April 2018

template vs templateUrl in angular 2 components.

In this article, We will discuss about What is the difference between template and templateUrl in angular 2 Components.

template:-
-------------
1/ template can be used to specify inline markup.
2/ template doesn't provide intellisense and auto-completion.
3/ template can't be reusable.

templateUrl:-
----------------
1/ templateUrl can be used to specify markup with in html file.
2/ templateUrl will provide intellisense and auto-completion.
3/ templateUrl can be reusable across many components.

0 comments:

Post a Comment