Using Yeoman along with the ng-book
Stop manually downloading and assembling Javascript, CSS, and HTML files. Use Yeoman for that plus get best practices baked right in.
- Install the latest versions of
Nodejs
,npm
, and thenyo
(Yeoman) - Create a directory for testing and switch into it.
- Install the Yeoman generator for Angular:
generator-angular
- Bring forth Angular scaffolding with Yeoman.
- Take a look at what Yeoman installed by browsing through the generated directories.
- Run
grunt serve
. - Copy the simple data binding example from page 12 to the clipboard.
- Then paste it into
app/views/main.html
- Save the file and the Yeoman
grunt serve
task will automatically reload the page. - Go back to the browser and we can see that the simple data binding example is working.
- Enjoy the book and Yeoman!
$ mkdir ~/www/labs && cd $_
$ npm install -g generator-angular
$ yo angular


app/
directory is the central directory.$ grunt serve



app/views/main.html
. For this example it is right above the HTML5 Boilerplate section.
app/views/main.html
that grunt watch
immediately kicks off a browser reload. Nice!.
- Pushed on 01/13/2014 by Christian