handlebars.js - Interleaved closing tag error in Handlebars (Ember.js) -



handlebars.js - Interleaved closing tag error in Handlebars (Ember.js) -

i decided seek ember.js.

i set little application, can't work.

i have file app.html

<!doctype> <html> <head> ... </head> <body> <script type="text/x-handlebars"> ... </script> </body> </html>

now, of course, doesn't render anything. include handlebars.js, ember.js, , app.js , renders properly.

the problem when seek add together curly braces, output blank. example, if set variables in js files , want display in app, <h1>{{title}}</h1>, <h1></h1>. when seek set {{input value="username"}}, nil gets displayed.

i no error messages, except when utilize closing tags. example, this

{{#link-to "http://google.ca"}}link{{/link-to}}

will create whole web page display

line 117: interleaved closing tag: link-to

i have no thought wrong. googling error message doesn't help much.

any hint?รง

update

this code:

<!doctype html> <html> <head> <meta charset="utf-8"> <title>ember starter kit</title> <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script> <script src="http://builds.emberjs.com/tags/v1.8.0/ember.js"></script> <script type="text/javascript"> app = ember.application.create(); app.router.map(function() { // set routes here }); app.indexroute = ember.route.extend({ model: function() { homecoming ['red', 'yellow', 'blue']; } }); </script> </head> <body> <script type="text/x-handlebars"> <h2>welcome ember.js</h2> {{outlet}} </script> <script type="text/x-handlebars" data-template-name="index"> <a href="http://google.ca">link</a> <ul> {{#each item in model}} <li>{{item}}</li> {{/each}} </ul> </script> </body> </html>

renders blank page error message:

line 36: interleaved closing tag: each

i'm not sure that's normal.

link-to meant ember routes only. (http://emberjs.com/guides/templates/links/)

in case write html link in template directly.

here little sample ember.js app google.ca link, have feeling html may not setup correctly outlet , template:

http://emberjs.jsbin.com/qivunivabo/3/edit

ember.js handlebars.js

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -