ember.js - emberjs direct access to resource not working -


I have 2 ways - sessions and sessions (because I want to present them in 2 different pages)

  App.Router.map (function () {this.route ("session", {path: "/ session"}); this.route ("session", {path: "/ session When I go:  # / session  - I get a nice table that I attracted, and when I did that Click on the link {{This.id}} {{/ # link-to 'session'}} {{/ / 

  {{# each model}} & lt; tr & Gt; & lt; td & gt;  
< P> This works - Separate handbars of the session are created

When I am getting an error directly # / session / 4 :

route:

  app. Go to the service = amber path.print ({model: function ()}. Store.find ('session');}}); app .SessionRoute = Ember.Route.extend ({Model: Functions (Params) { Return.get ('store'). Search ('session', parameters. Session_id); }});  

To work, you must this.resource your routes When announcing:

  app.rotter.map (function () {this.route ("session", {path: "/ session"}); this.resource ("session" , {Path: "/ session /: session_id"}}}}  

Comments