February 2016
Beginner to intermediate
308 pages
5h 46m
English
Components can be used in applications in a variety of ways. In this recipe, we'll see how to create a component and add it to a template.
To begin, we'll create a simple component that displays student information.
$ ember g component student-info
All components must have a dash in their names. This will generate the student-info component. This stub will be created in the app/components and app/templates/components folders as well.
student-info.js file in the app/components folder. Add a few simple properties:// app/components/student-info.js import Ember from 'ember'; export default Ember.Component.extend({ name: 'Erik', grade: 12, nickName: ...Read now
Unlock full access