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

How to cancel render of Template when start redirect? #644

Open
comerc opened this issue Jun 7, 2016 · 2 comments
Open

How to cancel render of Template when start redirect? #644

comerc opened this issue Jun 7, 2016 · 2 comments

Comments

@comerc
Copy link

comerc commented Jun 7, 2016

onRendered executed anyway:

  onCreated: ->
    route = FlowRouter.getParam('user')
    @user = findUser(route)
    FlowRouter.go('notFound') if not @user
  onRendered: ->
    $('#userName').text(@user.name)
@comerc
Copy link
Author

comerc commented Jun 8, 2016

Help me please! :)

IronRouter does not have this problem. console.log('onRendered'); does not call in this test:

Template.login.onCreated(function() {
    console.log('onCreated');
    Router.go('/restore-password');
});

Template.login.onRendered(function() {
    console.log('onRendered');
});

@comerc
Copy link
Author

comerc commented Jun 10, 2016

Oh-oh-oh, related issues: #292 #96

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

No branches or pull requests

1 participant