-
Notifications
You must be signed in to change notification settings - Fork 164
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
Routing #28
Comments
I update original post and add code also for ViewModels |
A bug is causing your use case to fail (routing to the same template but different param on a static dom target.) Replace the file under your node_modules\dotnetify\dist with this one: dotnetify-react.js v1.0.3-beta, and rebuild the webpack bundle. Let me know how it goes. Thanks! |
Now it is working like a charm. Thanks a lot! Maybe sometimes event OnRouted on server is not reached after selecting item. I noticed it also in your Routing example for react in VS2017. In console is log that ModelView received it but OnRouted event is not invoked. |
My API service and ReactJs Apps are hosted in different servers. Is there is any way to configure hub url in reactjs app? |
If you're using create-react-app boilerplate, configure "proxy" in package.json to your API server. If not, use SignalR API to set it before calling dotnetify:
BTW, pls create new issue as this doesn't seem to be related to this thread. |
Mewriick, I only noticed just now that you left a comment after you said that 'it's working':
In that routing example, the clickable div area of the buttons in page 2 is wider than the actual route anchor tag, so it can give the impression that you click a button (close to its edge) but it doesn't trigger the OnRouted event. Would this explain what you saw? |
Fix included in npm v2.0.5-beta. |
Hello,
I have little bit struggling with the routing. I have one page (Index) with the list of items and I want to route to their details. For first request it is for good, but the problem is when I select another item, routing is not working. I follow yours tutorial so ApplicationDetail view model has registred OnRouted event. But from network snapshot is obvious that the second request for detail is not received.
Here are my project structure and components.
Here is the network communication
Here are compontenst:
ViewModels
I do not know whats wrong. Can you help me please?
The text was updated successfully, but these errors were encountered: