Hello there.
I’m pretty new to Meteor but as a web designer, it looks awesome and easy for me to understand. There is ton of help all over the Internet and so far, I’ve been able to build a website with an admin panel, which was unbelievable before with PHP or whatever.
But now, I’m stuck and I can’t find actual hints anywhere.
So here I am coming to you guys.
I understood how to pass data from collections within a helper and inject them into html with handlebars ( so cool >< ).
But now, I want to do the same in Javascript.
Let me explain :
I have FlowRouter and I want to store parameters into a collection so that my routes configuration won’t have repeated code, but something dynamic.
Here comes my imports/startup/client/routes.coffee:
{ Meteor } = require 'meteor/meteor'
handle = Meteor.subscribe('routes')
Routes.find {}
FlowRouter.route 'routePath',
triggersEnter: [ ->
Meteor.defer ->
$('sectionAddClass').addClass 'classEffect'
return
return
]
action: (params, queryParams) ->
BlazeLayout.render 'mainLayout', mainContainer: 'mainContainer'
name: 'routeName'
title: 'routeTitle'
I think there is something to do with cursor, foreach or whatever but I don’t understand right now how javascript is dealing with collection’s data in this particular way. I understand this is a pretty lame question but as a designer I’m trying to do my best to get it and sometimes, it’s sounds really harsh.
Any hint would be appreciated!
Thanks guys.