shivani shivani - 4 months ago 8
AngularJS Question

Render partial view in angular JS

Is there any way to create a partial view like .net MVC in angular JS. I'd like to achieve the same partial view functionality in angular JS.

For Ex.
I want to reuse a modal popup in all page so I don't have to write the same code on each page.

Answer

you can use ng-include for partials, but if you are going to use this partial inside a ng-repeat its best to use a directive instead.It has better performance.

Comments