Ember.js for template

74 views
Skip to first unread message

Tha Sophearak

unread,
Jan 20, 2014, 2:53:41 AM1/20/14
to tot...@googlegroups.com
Hello everyone, 

I see in the total.js website said that Total.js is best solution for Angular, Backbone, Ember.js...
 
I want to use ember.js for render template. could you please guide me some?

Thanks you 

Peter Širka

unread,
Jan 20, 2014, 3:54:58 AM1/20/14
to tot...@googlegroups.com
Hello,

Create definition: ember.js

framework.accepts('.hbs', 'text/html');

This definition is needed for ember templates, because the framework accepts only specific files.

Create ember template: /public/templates/application.hbs

<div>
 
<label>Name:</label>
  {{input type="text" value=name placeholder="Enter your name"}}
</div>
<div class="text">
   
<h1>My name is {{name}} and I want to learn Ember!</h1>
</div>

Others should be easy :-)
Thanks.

Sophearak

unread,
Jan 20, 2014, 4:03:17 AM1/20/14
to tot...@googlegroups.com
thanks you very much (-:

Sophearak

unread,
Jan 20, 2014, 10:25:32 PM1/20/14
to tot...@googlegroups.com
Hello Peter,

Could you please guide me the rest work of embed ember.js for template. 

I add this to: views/_layout.html


Do I need to modified something in Controller?

Peter Širka

unread,
Jan 21, 2014, 5:29:13 AM1/21/14
to tot...@googlegroups.com
Hello,
no, now you must create client-side code :-)

Thanks.
Reply all
Reply to author
Forward
0 new messages