February 2016
Beginner to intermediate
308 pages
5h 46m
English
Debugging your template is a task that you'll often use. Here are the steps to do this.
The most basic way of debugging Ember templates is to use {{log}} and {{debugger}}.
log-example. Run this command in the root application folder:
$ ember g component log-example
This will create a new component template and JavaScript files.
log-example.js file in the app/components folder and a new property called helloText:// app/components/log-example.js
import Ember from 'ember';
export default Ember.Component.extend({
helloText: 'Hello World'
});This is a simple component with just one property.
log-example.hbs file in the app/templates/components ...Read now
Unlock full access