Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(uiView): do not leave initial view scope undestroyed #3164

Merged
merged 1 commit into from
Nov 29, 2016
Merged

fix(uiView): do not leave initial view scope undestroyed #3164

merged 1 commit into from
Nov 29, 2016

Conversation

jpekkala
Copy link
Contributor

Previously the contents of the initial view were linked and left
undestroyed when the view was replaced with a subview. Because the view
was not destroyed, directives like ngInclude assumed it was safe to
compile and link asynchronous content to it. This would cause a ctreq
error if the asynchronous content required another directive from the
DOM. Now the initial view is either not linked at all or its scope is
properly destroyed.

Closes #1896

Previously the contents of the initial view were linked and left
undestroyed when the view was replaced with a subview. Because the view
was not destroyed, directives like ngInclude assumed it was safe to
compile and link asynchronous content to it. This would cause a ctreq
error if the asynchronous content required another directive from the
DOM. Now the initial view is either not linked at all or its scope is
properly destroyed.

Closes #1896
@@ -324,7 +324,7 @@ describe('uiView', function () {
});

it('should instantiate a controller with controllerAs', inject(function($state, $q) {
elem.append($compile('<div><ui-view>{{vm.someProperty}}</ui-view></div>')(scope));
elem.append($compile('<div><ui-view></ui-view></div>')(scope));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test broke but not because of what it tests. The template property was not originally in the test and after this change the template property overwrites the initial view.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what this was originally trying to test >_>

@christopherthielen christopherthielen merged commit 37d6f9a into angular-ui:master Nov 29, 2016
@christopherthielen christopherthielen added this to the 1.0.0-beta.4 milestone Nov 29, 2016
christopherthielen pushed a commit that referenced this pull request Dec 15, 2016
…ed rejection)

This is a backport of #3164 from `master` to `legacy`

Previously the contents of the initial view were linked and left
undestroyed when the view was replaced with a subview. Because the view
was not destroyed, directives like ngInclude assumed it was safe to
compile and link asynchronous content to it. This would cause a ctreq
error if the asynchronous content required another directive from the
DOM. Now the initial view is either not linked at all or its scope is
properly destroyed.

Closes #3164
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants