Git Product home page Git Product logo

angular_slider's Introduction

A Lineman JS Template using Angular

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

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.js
  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/davemo/lineman-angular-template.git my-lineman-app
  2. cd my-lineman-app
  3. sudo npm install -g lineman
  4. npm install
  5. lineman run
  6. open your web browser to localhost:8000

Running Tests

This template was used as the basis of my 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. Make sure you have firefox installed.
  4. lineman run from 1 terminal window
  5. lineman grunt spec-e2e from another terminal window

Defining your apps angular.module in CoffeeScript

If you are using Coffeescript to define the angular.module for your app, you will need to swap the concat order in config/application.js such that coffeescript files are included before javascript, here's a sample config. (If you are using JavaScript for defining the angular.module the default concat order is fine).

js: {
  // if using coffeescript and your angular.module is defined in a .coffee file, files.coffee.generated comes first
  src: ["<%= files.js.vendor %>", "<%= files.coffee.generated %>", "<%= files.js.app %>", "<%= files.ngtemplates.dest %>"],
  dest: "<%= files.js.concatenated %>"
},

Hopefully this helps you get up and running with AngularJS!

angular_slider's People

Contributors

davemo avatar dennisburton avatar foxandxss avatar maxim-filimonov avatar searls avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.