Skip to content

Tweak $location decorator and visit(); all tests pass.#16

Closed
wardbell wants to merge 1 commit into
yearofmoo:masterfrom
wardbell:master
Closed

Tweak $location decorator and visit(); all tests pass.#16
wardbell wants to merge 1 commit into
yearofmoo:masterfrom
wardbell:master

Conversation

@wardbell
Copy link
Copy Markdown

  • Guard against infinite $location.path loop as explained in comment
  • Give visit() one more tick before it invokes the callback; determined empirically that this is necessary on occasion else the viewElement() may return empty object

- Guard against infinite $location.path loop as explained in comment
- Give visit() one more tick before it invokes the callback; determined empirically that this is necessary on occasion else the viewElement() may return empty object
@wardbell
Copy link
Copy Markdown
Author

You may prefer the stabilize approach in gaelazzo's pull request as it is less of a hacky guess than mine.

Something has to be done because I'm running into the exact same problem he describes.

The infinite loop problem can be revealed when a route has a redirectTo that always fails. That's extremely likely if the developer neglects to set the {mockLocationPaths: false} option and is not pre-caching the templates (my situation).

@wardbell wardbell closed this Nov 7, 2015
@wardbell
Copy link
Copy Markdown
Author

wardbell commented Nov 7, 2015

I think we can safely let this die ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant