Skip to content

1uptalent/angular-app-boilerplate

Repository files navigation

A Lineman JS boilerplater

This is a project template for Angular JS applications using Lineman and Lineman JS Template using Angular.

It includes the following features:

  1. Template Precompilation into Angulars $templateCache using grunt-angular-templates
  2. A basic login, logout service bound to sample routes inside config/server.coffee
  3. A router, and 2 views home and login
  4. A directive that shows a message on mouseover
  5. 2 Controllers, for home and login, with $scope variables set and bound
  6. A working, bound login form (username/password don't matter, but are required)
  7. Configured grunt-ngmin so you don't have to fully qualify angular dependencies.
  8. Auto generated sourcemaps with inlined sources via grunt-concat-sourcemap (you'll need to enable sourcemaps in Firefox/Chrome to see this)
  9. Unit Tests and End-to-End Tests
  10. Configuration to run Protractor for End-to-End Tests

Instructions

  1. git clone https://github.com/1uptalent/angular-app-boilerplate.git my-angular-app
  2. cd my-angular-app
  3. npm install -g lineman
  4. npm install -g bower
  5. npm install
  6. lineman run
  7. open your web browser to localhost:3001

Running Tests

This template was used as the basis of @davemo's Testing Strategies for Angular JS screencast, and contains all the tests we wrote in the screencast and a few more!

To run the unit tests:

  1. lineman run from 1 terminal window
  2. lineman spec from another terminal window, this will launch Testem and execute specs in Chrome

To run the end-to-end tests:

  1. npm install protractor
  2. brew install selenium-server-standalone
  3. brew install chromedriver
  4. Make sure you have chrome installed.
  5. lineman run from 1 terminal window
  6. lineman grunt spec-e2e from another terminal window

Troubleshooting:

If you see this error: Warning: there's no selenium server jar at the specified location,
you may need to change the selenium-server-standalone jar version in config/spec-e2e.coffee
to the actual you see in /usr/local/opt/selenium-server-standalone/libexec.

If you see this error: Fatal error: The path to the driver executable must be set by the
webdriver.chrome.driver system property, you may need to download the chromedriver
(https://code.google.com/p/selenium/wiki/ChromeDriver) and place it in /usr/local/bin (mac).

Hopefully this helps you get up and running with AngularJS!

About

Boilerplate for coffeescripted AngularJS apps using Bootstrap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published