0

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.

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

From this question it is hard to judge what you want to achieve, but from angulars perspective you can always use ng-include to include template fragments.

I'd recommend to either provide a more detailed example - potentially with code example - so that you get better support. If you want to create something that is a partial in an MVC framework, then I'd say that should be a component/directive in angular.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.