Ember router: how to use transitionTo

前端 未结 2 1062
孤街浪徒
孤街浪徒 2020-12-10 09:28

I have a link that looks like this

index.html#/calendar/year/month

This is how I set up my routes:

App.Router.map(function(         


        
2条回答
  •  鱼传尺愫
    2020-12-10 09:58

    The router is for more than a url manager. It manages the state for the entire application. In order to fully help you it would be better to see more code. Have you created routes? Are you just trying to go to a 'url' that is not handled by the ember app?

    this.transistionTo(routeName) expects to receive a named route as far a I know. It will then generate the correct url for that route. If you have not setup any routes then I don't think you are able to use it.

提交回复
热议问题