jjzjj

transitionToRoute

全部标签

javascript - transitionToRoute 的正确方法

我正在ember.js上进行实时搜索。这是代码App.Router.map->@resource"index",{path:"/"}@resource"index",{path:"/:query"}App.Torrents=findByQuery:(query)->url="/api/find/#{query}"$.getJSON(url)App.IndexRoute=Ember.Route.extendmodel:(params)->App.Torrents.findByQuery(params.query)App.IndexController=Ember.ArrayControl

javascript - EmberJS : How to transition to a router from a controller's action

我有一个Action:{{actioncreatetarget="controller"}}我像这样针对绑定(bind)的Controller(而不是路由器):App.AddBoardController=Ember.Controller.extendcreate:->App.store.createRecordApp.Board,{title:@get"boardName"}App.store.commit()//TODO:Redirecttoroute如何从Controller操作重定向回路由? 最佳答案 使用transitio