O'Reilly logo

Mastering Ember.js by Mitchel Kelonye

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Loading the built files

The built files are referenced from the build folder as follows:

<link rel="stylesheet" href="public/public.css">

<script src="public/public.js"></script> 
<script>require('app');</script>

Notice that the application is booted by requiring the app component. The app component includes an index.js file that gets executed in the process. Every requirable component needs to specify this file in its .scripts property in the configuration file. It may also specify the main file via the .main flag, so we can name the index.js file as app.js and then set the main flag as "app.js". The script requires the remotely-installed ember.js component, creates the application, and defines the router:

require('ember'); window.App = Em.Application.create(); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required