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

[#19] Login redirect state url fixed #21

Merged
merged 4 commits into from
Sep 14, 2017
Merged

[#19] Login redirect state url fixed #21

merged 4 commits into from
Sep 14, 2017

Conversation

nirojdyola
Copy link
Contributor

No description provided.

Copy link
Member

@paulbert paulbert left a comment

Choose a reason for hiding this comment

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

Looks pretty good, and is certainly working. Just remove the ngOnInit and I think we can merge this.

Thanks!

) {}


ngOnInit() {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you actually should use ngOnInit here, just assign returnUrl to the route.

ngOnInit is used mainly for accessing the services to initialize data. returnUrl can be set with just simple assignment, so it doesn't need to utilize that lifecycle hook.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Used returnUrl in constructor

@paulbert
Copy link
Member

paulbert commented Sep 4, 2017

You don't need to add it into the Constructor, either. Just add it as a normal property of the class.

@paulbert
Copy link
Member

@nirojdyola See my latest commit. returnUrl can be set immediately. You don't need to set it in a method.

@paulbert paulbert merged commit 8f4cfbe into master Sep 14, 2017
@lmmrssa lmmrssa deleted the 19-LoginRedirect branch November 7, 2017 05:46
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.

None yet

3 participants