1

Is it possible to prevent $scope to be inherited in nested views in ui-router for AngularJS?

I am working with AngularJS 1.x and ui.router 1.0.0-beta.3

1 Answer 1

1

ui-view directive uses inherited scope and it instantiates route controller with this scope. This is default behaviour that isn't supposed to be modified.

If isolated scope is desirable, route components should be used instead of route controller/template pairs.

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

1 Comment

I see I have to do some restructuring of the code, thanks.

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.