Closed openqubit closed 8 years ago
I have a books crud app that i have made and i need to view an individual item. My url looks like this
http://localhost:3000/crud/view/cwfet5RZxkZqog2s5
This is my code inside the CrudController
view: function() { this.render('Viewed', {to: 'viewer'}); },
This is my route
Router.route('/crud/view/:_id', { name: 'view', controller: 'CrudController', action: 'view', where: 'client' }); and this is my helper
Template.Viewed.helpers({ 'crud/view/:id': function(){ return Crud.findOne({_id: this.params._id}); } });
My code as is gives me a blank when i try to access the db value in the template like{{name}}
{{name}}
Can someone guide me on how to set up my code when i have the url am having.
I have a books crud app that i have made and i need to view an individual item. My url looks like this
http://localhost:3000/crud/view/cwfet5RZxkZqog2s5
This is my code inside the CrudController
This is my route
My code as is gives me a blank when i try to access the db value in the template like
{{name}}
Can someone guide me on how to set up my code when i have the url am having.