Hi Everyone,
to start of, I am pretty new at Ember and Discourse so excuse anything I ask that should be self explanatory…
I am creating a plugin for a client and need to define some dynamic routes. I have done this in plane ember within 15 minutes, but can’t seem to get this to work in discourse.
Basically I need a routing structure like this:
Basically I have posts and need to define a show view per post.
Have these routes setup in plain Ember:
this.route('posts');
this.route('posts.show', { path: 'posts/:post_id' }
I have a controller setup that just returns some json, so the actual post_id wouldn’t matter.
Basically I understand that once you have a dynamic route, you should define a specific route that returns a model, which you can then use in the template.
Currently it is not working and returns a undefined property ‘post’ for undefined. So I’m guessing I need to do something more in discourse to get this to work.
Can someone point me in the right direction and/or point me to some documentation where I can get this information?
Thanks!
Tjaco