I know it might be an easy question, but I didn't find an answer :-/
I read in SPA many times the word 'Templates' into which the data is loaded. Are 'Templates' just a regular View into which the data is filled into? Or what is the difference and do they overlap?
A template is a form of HTML that tells Angular how to render the component. Views are typically organized hierarchically, allowing you to modify or show and hide entire UI sections or pages as a unit. The template immediately associated with a component defines that component's host view.
According to Angular, when you have a complex view (i.e. a view with more than 3 lines), then go with templateUrl (use external file); otherwise, use the template (inline HTML) properly of the component decorator.
AngularJS is client-side template rendering while Express is server-side. Though, there is some potential for overlap (there are variants of EJS for both environments).
There are two types of templates: Static Template. Dynamic Templates.
When AngularJS starts your application, it parses and processes this new markup from the template using the compiler. The loaded, transformed and rendered DOM is then called the view.
ref: https://docs.angularjs.org/guide/concepts#view
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