Closed mlohr closed 12 years ago
I removed the html
tag from the template. This fixed the error on meteor bundeling.
But now I have an empty browser window, how to render? Will read the docs if I can fix this on my own...
Ok now I know you need to have the main template called views/index.blade
with something like:
body
p Hello world!
Now this is shown!
Did you get it working? :) Sorry, I know there is very little documentation on this. I want to create a wiki page about Meteor integration. Any findings/watch-outs that we should post to the wiki?
Ah, just realized that you posted some content to the wiki. Thanks!
The wiki page doesn't really explain how you render templates without writing the JavaScript code to do so yourself. That is, once you've created views/test.blade
, how do you render the test
template in body.blade
? Is include 'body.blade'
the right approach?
@TrevorBurnham - the only way to render templates is to write the JavaScript code to do so yourself. That being said, include
statements certainly work fine in any template. What are you trying to do?
@bminer I'm just trying to do basic templating. The wiki page currently says
Create templates in your
views/
directory and render them as you would a Handlebars template.
But I would render a Handlebars template with the Handlebars syntax
{{> templateName}}
not by writing code somewhere to run Meteor.ui.render(Template.templateName)
and inject the result into the DOM, which is the only way to render templates that's demonstrated on that wiki page.
An example project (like, say, a Blade version of the Leaderboard app) would be extremely helpful.
Right... the Handlebars syntax for includes is {{> templateName}}
. In Blade, the equivalent is include "templateName.blade"
. Don't put Meteor.ui.render
calls in your templates. Does that help? You are welcome to add/modify the wiki page as you see fit. :)
I have installed blade within my meteor environment, but don't know how to use it and or how to set it up.
As an "hello world" I have to next template file: views/hello.blade:
Now if I kick off meteor I get the next errors:
Errors prevented startup:
Somehow
tmpl
is undefined??