Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

revert: "fix(ngRoute): allow ngView to be included in an asynchronously loaded template" #14424

Closed
wants to merge 3 commits into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Apr 13, 2016

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix (regression).

What is the current behavior? (You can also link to an open issue here)
Eagerly loading $route, could break tests, because it might request the root or default route
template (something $httpBackend would know nothing about).
See #14337.

What is the new behavior (if this is a feature change)?
Tests don't break.
Also, this was added as a known issue in ngView docs.

Does this PR introduce a breaking change?
No

Please check if the PR fulfills these requirements

Other information:
This reverts commit 5e37b2a.

It will be re-applied for v1.6.x, with a breaking change notice and possibly a way to disable
the feature is tests.

Fixes #14337

gkalpak added 2 commits April 13, 2016 14:06
…usly loaded template"

This reverts commit 5e37b2a.
Eagerly loading `$route`, could break tests, because it might request the root or default route
template (something `$httpBackend` would know nothing about).

It will be re-applied for `v1.6.x`, with a breaking change notice and possibly a way to disable
the feature is tests.

Fixes angular#14337
@@ -26,6 +26,12 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
*
* The enter and leave animation occur concurrently.
*
* @knownIssue If `ngView` is contained in an asynchronously loaded templated (i.e. not directly
Copy link
Contributor

Choose a reason for hiding this comment

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

templated
And I would list the usual use-cases instead (e.g. in an ngInclude or in a directive's templateUrl)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@Narretz
Copy link
Contributor

Narretz commented Apr 13, 2016

LGTM

@gkalpak gkalpak closed this in f785c0c Apr 13, 2016
@gkalpak gkalpak deleted the fix-ngRoute-revert-5e37b2a branch April 14, 2016 20:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default route gets resolved in test code when calling $httpBackend.flush() or scope.$apply()
3 participants