-
Notifications
You must be signed in to change notification settings - Fork 193
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
Feature Request: manual initialization #180
Comments
Can I have the usecase for this? Then I can think what are the possible things we can do. |
It's pretty simple: I want to initialize and run my custom app within a So here is the code i have which causes problems: Meteor.startup ->
TestApp.app = new TestApp.Application()
TestApp.app.start()
FlowRouter.route '/test/:code',
name: 'testRoute'
triggersEnter: [(context, redirect) -> redirect "#{context.path}/search"]
FlowRouter.route '/test/:code/search',
name: 'testSearchRoute'
action: (params) ->
TestApp.app.publish new TestApp.SearchRouteVisited code: params.code visiting |
Okay. We just faced a similar issue with flow-layout and we are fixing it with rendering it inside a I hope that'll fix your problem too using a similar patten. It's a kind of tricky on how to give an handler to initialise Flow Router. (I mean in API wise) |
I think I've the API in mind. We can introduce something called |
Ok great :-) i am happy about any solution that solves this problem! |
Sounds good @arunoda |
If this solved, I think this may be the fast feature request implementation I have done :D |
Awesome, thanks so much! 👍 |
Hope we fixed this :) |
Yeah it works now! 😉 thanks again |
I have another use case that I can't seem to get working with the current implementation of wait() and initialize(). I'm using react, jsx, universe:modules for import/export, etc. My main.js file looks like this:
If I'm correct, FlowRouter doesn't allow the addition of |
You can add routes later on via |
It sounded like it would work to me too, I may just be doing else wrong; definitely in the experimentation phase of this setup. https://github.com/zachdixon/socialcentiv-meteor/tree/modules |
I think you're right that this isn't a FlowRouter issue, I've tried it with React Router as well and got the same errors. It must be something with my app-deps package that I got from here Sorry to bother you, still trying to figure out the issue. |
|
Hey @arunoda!
Awesome package, works great for my current customer project 😉
There is only one thing that caused me some trouble: I can't control the initialization of flow-router.
i want routing to start exactly when the app is ready for it and not when your
Meteor.startup
hook is called internally. This works perfectly with iron router when telling it "not to autorun", could you add a similar api?I even tried overriding the
Router.prototype.initialize
method but then i got other weird errors.The text was updated successfully, but these errors were encountered: