By Alex LaFroscia
# Install through NPM
npm install -g ember-cli
# Optional: Install PhantomJS for testing
npm install -g phantomjs
Dependencies:
For Testing:
# Create a new app
ember new test-app
# Start the development server
# Your project will be set up on port 4200 with live-reloading
ember server
# Create a route and template
ember generate route index
# Create an array controller
ember g controller --type=array
# Run the test suite
ember test # CI Mode
ember test --server # Browser mode
// app/routes/index.js
import Ember from 'ember';
import FooMixin from "./mixins/foo";
export default Ember.Route.extend(FooMixin, {
model: function() {
return ['red', 'yellow', 'blue'];
}
});