├── .gitattributes ├── README.md ├── .gitignore ├── .bowerrc ├── app ├── view1 │ ├── view1.html │ └── view1.js ├── view2 │ ├── view2.html │ └── view2.js ├── components │ └── version │ │ ├── version.js │ │ ├── version-directive.js │ │ └── interpolate-filter.js ├── app.js ├── app.css └── index.html ├── .editorconfig ├── bower.json └── package.json /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Angular Boilerplate 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | bower_components 3 | -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory":"app/bower_components" 3 | } -------------------------------------------------------------------------------- /app/view1/view1.html: -------------------------------------------------------------------------------- 1 |

This is the partial for view 1.

2 | -------------------------------------------------------------------------------- /app/view2/view2.html: -------------------------------------------------------------------------------- 1 |

This is the partial for view 2.

2 |

3 | Showing of 'interpolate' filter: 4 | {{ 'Current version is v%VERSION%.' | interpolate }} 5 |

6 | -------------------------------------------------------------------------------- /app/components/version/version.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('myApp.version', [ 4 | 'myApp.version.interpolate-filter', 5 | 'myApp.version.version-directive' 6 | ]) 7 | 8 | .value('version', '1.0'); 9 | -------------------------------------------------------------------------------- /app/components/version/version-directive.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('myApp.version.version-directive', []) 4 | 5 | .directive('appVersion', ['version', function(version) { 6 | return function(scope, elm, attrs) { 7 | elm.text(version); 8 | }; 9 | }]); 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [package.json] 11 | indent_style = space 12 | indent_size = 2 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /app/components/version/interpolate-filter.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('myApp.version.interpolate-filter', []) 4 | 5 | .filter('interpolate', ['version', function(version) { 6 | return function(text) { 7 | return String(text).replace(/\%VERSION\%/mg, version); 8 | }; 9 | }]); 10 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-boilerplate", 3 | "version": "1.0.0", 4 | "description": "A starter project for AngularJS", 5 | "homepage": "https://github.com/angular/angular-seed", 6 | "license": "ISC", 7 | "dependencies": { 8 | "angular": "~1.5.0", 9 | "angular-route": "~1.5.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/view2/view2.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('myApp.view2', ['ngRoute']) 4 | 5 | .config(['$routeProvider', function($routeProvider) { 6 | $routeProvider.when('/view2', { 7 | templateUrl: 'view2/view2.html', 8 | controller: 'View2Ctrl' 9 | }); 10 | }]) 11 | 12 | .controller('View2Ctrl', [function() { 13 | 14 | }]); -------------------------------------------------------------------------------- /app/app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Declare app level module which depends on views, and components 4 | angular.module('myApp', [ 5 | 'ngRoute', 6 | 'myApp.view1', 7 | 'myApp.view2', 8 | 'myApp.version' 9 | ]). 10 | config(['$routeProvider', function($routeProvider) { 11 | $routeProvider.otherwise({redirectTo: '/view1'}); 12 | }]); 13 | -------------------------------------------------------------------------------- /app/view1/view1.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('myApp.view1', ['ngRoute']) 4 | 5 | .config(['$routeProvider', function($routeProvider) { 6 | $routeProvider.when('/view1', { 7 | templateUrl: 'view1/view1.html', 8 | controller: 'View1Ctrl' 9 | }); 10 | }]) 11 | 12 | .controller('View1Ctrl', [function() { 13 | 14 | }]); 15 | -------------------------------------------------------------------------------- /app/app.css: -------------------------------------------------------------------------------- 1 | /* app css stylesheet */ 2 | 3 | .menu { 4 | list-style: none; 5 | border-bottom: 0.1em solid black; 6 | margin-bottom: 2em; 7 | padding: 0 0 0.5em; 8 | } 9 | 10 | .menu:before { 11 | content: "["; 12 | } 13 | 14 | .menu:after { 15 | content: "]"; 16 | } 17 | 18 | .menu > li { 19 | display: inline; 20 | } 21 | 22 | .menu > li:before { 23 | content: "|"; 24 | padding-right: 0.3em; 25 | } 26 | 27 | .menu > li:nth-child(1):before { 28 | content: ""; 29 | padding: 0; 30 | } 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-boilerplate", 3 | "version": "1.0.0", 4 | "description": "iceStone angular boilerplate", 5 | "scripts": { 6 | "postinstall": "bower install", 7 | "prestart": "npm install", 8 | "start": "./node_modules/.bin/hs -a localhost -p 9000 -o" 9 | }, 10 | "keywords": [ 11 | "iceStone", 12 | "Micua", 13 | "Angular", 14 | "Boilerplate" 15 | ], 16 | "author": "iceStone (http://wedn.net/)", 17 | "license": "ISC", 18 | "dependencies": {}, 19 | "devDependencies": { 20 | "http-server": "^0.9.0" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | My AngularJS App 8 | 9 | 10 | 11 | 15 | 16 |
17 | 18 |
Angular boilerplate app: v
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | --------------------------------------------------------------------------------