├── .gitattributes ├── app ├── .buildignore ├── robots.txt ├── scripts │ ├── data │ │ ├── success.json │ │ └── sample1.json │ ├── filters │ │ └── reverse.js │ ├── directives │ │ └── youtube.js │ ├── controllers │ │ ├── main.js │ │ ├── contact.js │ │ ├── about.js │ │ └── master.js │ ├── app.js │ └── services │ │ ├── validators.js │ │ └── request.js ├── favicon.ico ├── styles │ ├── index.less │ └── main.css ├── views │ ├── fragments │ │ ├── footer.html │ │ └── header.html │ ├── modals │ │ ├── splendid.html │ │ └── video.html │ ├── main.html │ ├── contact.html │ └── about.html ├── images │ └── yeoman.png ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.svg ├── index.html ├── 404.html └── .htaccess ├── .bowerrc ├── .gitignore ├── .travis.yml ├── test ├── runner.html ├── spec │ ├── services │ │ └── request.js │ ├── filters │ │ └── palindrome.js │ ├── directives │ │ └── youtube.js │ └── controllers │ │ ├── main.js │ │ ├── about.js │ │ ├── master.js │ │ └── contact.js └── .jshintrc ├── .jshintrc ├── .editorconfig ├── bower.json ├── package.json ├── karma-e2e.conf.js ├── README.md ├── karma.conf.js └── Gruntfile.js /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /app/.buildignore: -------------------------------------------------------------------------------- 1 | *.coffee -------------------------------------------------------------------------------- /app/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /app/scripts/data/success.json: -------------------------------------------------------------------------------- 1 | { 2 | "result": "okay" 3 | } -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "app/bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .tmp 4 | .sass-cache 5 | app/bower_components 6 | -------------------------------------------------------------------------------- /app/scripts/data/sample1.json: -------------------------------------------------------------------------------- 1 | [ 2 | "Bert", 3 | "Ernie", 4 | "Oscar the Grouch" 5 | ] -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tivix/AngularJSPractices/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /app/styles/index.less: -------------------------------------------------------------------------------- 1 | @header-font: Impact; 2 | h1{ 3 | font-family: @header-font; 4 | } -------------------------------------------------------------------------------- /app/views/fragments/footer.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /app/images/yeoman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tivix/AngularJSPractices/HEAD/app/images/yeoman.png -------------------------------------------------------------------------------- /app/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tivix/AngularJSPractices/HEAD/app/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /app/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tivix/AngularJSPractices/HEAD/app/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /app/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tivix/AngularJSPractices/HEAD/app/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '0.8' 4 | - '0.10' 5 | before_script: 6 | - 'npm install -g bower grunt-cli' 7 | - 'bower install' 8 | -------------------------------------------------------------------------------- /app/scripts/filters/reverse.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('angularJspracticesApp') 4 | .filter('reverse', function () { 5 | return function (input) { 6 | return input.split('').reverse().join(''); 7 | }; 8 | }); 9 | -------------------------------------------------------------------------------- /test/runner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |This is an example modal.
7 |You are currently on the {{where}} page.
8 |This video embed is generated inside a div with a custom youtube directive. The attribute is added to the 8 | div element and specifies a youtube ID string used to generate the embed code.
9 |
4 | 
5 | Always a pleasure scaffolding your apps.
6 |
14 | Here's an example of how AngularJS filters work. I've created a date object. If I present it in its raw format, we get {{now}}. If I apply a filter, we get {{now | date : "MM/dd/yyyy"}}. Similarly, with currency, I might have a value like {{price}}. If I wanted to properly format it, I could apply the currency filter and get {{price | currency : "$"}} instead. 15 |
16 |You can also define your own custom filters. An example I've prepared is reverse.js. Let's say I have the message {{message}}. When I apply the reverse filter, it becomes {{message | reverse}}.
17 |19 | Try out a directive in this modal window. 20 |
21 |23 | HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites. 24 |
25 | 26 |28 | AngularJS is a toolset for building the framework most suited to your application development. 29 |
30 | 31 |Spectacular Test Runner for JavaScript.
33 |The following is a sample form. It demonstrates how to wire up a model 7 | property to a form field and configure validation. The following field has 8 | the following validation rules:
9 |The following has been loaded from sample1.json in the /app/scripts/data directory.
19 |It's an example of how to use the resolve property of the $routeProvider service to load 20 | data before the route is changed.
21 |There are a few things that happen differently in the controller (about.js) to make this 41 | happen. Check out the comments for more info.
42 |So you're interested in {{who}}, are you? Sorry, I've got nothin'. Better go back 53 | and try someone else.
54 |Sorry, but the page you were trying to view does not exist.
146 |It looks like this was the result of either:
147 |