How to decide when to use ngView or ngInclude?

ngView works together with routing, and is mostly essential to an angular SPA. It’s normally used to include the main content of your site, the bit in between the header and footer that changes every time a user clicks a link. Its integration with routing means changing the ngView content changes the controller too (depending on your configuration).

ngInclude is a general purpose include, you may not even need it. You’d sometimes use it inside a view to avoid repeating yourself, in the cases where several views need the same code included.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)