Added support to ui-router ($state)#225
Open
danieleratti wants to merge 1 commit intorevolunet:masterfrom
Open
Added support to ui-router ($state)#225danieleratti wants to merge 1 commit intorevolunet:masterfrom
danieleratti wants to merge 1 commit intorevolunet:masterfrom
Conversation
Added support to ui-router in order to read the $state.current.doNotTrack and decide whether send or not the pageView. This control is also done in the first page loading.
Collaborator
|
This is a good looking change but there needs to be some unit tests to go along with it and appropriate additions to the Readme.md for documenting the added functionality. |
justinsa
reviewed
Apr 6, 2018
| if (readFromState) { | ||
| // Evaluate whether send or not the first pageview | ||
| // I didn't find a better approach than $timeout since in this context the $state hasn't been loaded yet | ||
| $timeout(function() { |
Collaborator
There was a problem hiding this comment.
Instead of the timeout is there an event you could listen to? Is the $stateChangeSuccess event sufficient for tracking the first route setup by ui-router? Could this first call simply not happen for ui-router as it will be caught by the event?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added support to ui-router in order to read the $state.current.doNotTrack and decide whether send or not the pageView.
This control is also done in the first page loading.