├── angularjs-douban-movie ├── assets │ └── css │ │ └── style.css ├── src │ ├── sass │ │ ├── _modules.scss │ │ ├── modules │ │ │ ├── _common.scss │ │ │ └── _grid.scss │ │ ├── _mixins.scss │ │ ├── app.scss │ │ ├── mixins │ │ │ └── _common.scss │ │ └── vendor │ │ │ └── _off-canvas.scss │ └── js │ │ ├── app.js │ │ ├── controllers │ │ ├── DetailController.js │ │ └── MainController.js │ │ ├── routes.js │ │ ├── directives │ │ └── directives.js │ │ ├── services │ │ ├── CommonService.js │ │ └── MovieService.js │ │ └── vendor │ │ └── off-canvas.js ├── README.md ├── ngviews │ ├── home │ │ ├── default.html │ │ └── detail.html │ └── common │ │ └── layout.html ├── package.json ├── index.html ├── gulpfile.js └── server.js ├── static └── js │ ├── angular-1.3.15 │ ├── version.txt │ ├── version.json │ ├── angular-csp.css │ ├── angular-cookies.min.js │ ├── angular-loader.min.js │ ├── angular-messages.min.js │ └── angular-cookies.min.js.map │ ├── angular-growl │ └── angular-growl.min.css │ └── prettify │ └── prettify.css ├── angularjs-tutorial ├── app.js ├── README.md ├── main.ctrl.js └── index.html ├── console_simple ├── scripts │ └── views │ │ ├── fuhe │ │ ├── v1.html │ │ ├── v2.html │ │ ├── v3.html │ │ └── main.html │ │ ├── login.html │ │ ├── account.html │ │ ├── register.html │ │ ├── scopewatch.html │ │ └── main.html └── index.html ├── angularjs_ngtemplate ├── views │ ├── mycontent3.html │ └── template.html └── data │ └── citys.json ├── angular_audio_player ├── bin │ └── server.sh ├── views │ ├── playerView.html │ └── nprListItem.html ├── README.md └── index.html ├── todos ├── .DS_Store ├── package.json ├── README.md └── public │ ├── app.js │ └── index.html ├── angularjs_app_site ├── README.md ├── package.json ├── client.js └── app │ ├── views │ ├── home.html │ ├── profile.html │ ├── signin.html │ └── signup.html │ └── js │ ├── lib │ └── ngStorage.js │ ├── app.js │ ├── services.js │ └── controllers.js ├── angularjs_login ├── p │ ├── img │ │ └── bg.jpg │ └── bootstrap-3.3.5 │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ └── npm.js ├── login │ ├── info.html │ └── login.html ├── toto_change.txt └── index.html ├── angular_sliderjs ├── images │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 6.jpg │ ├── 7.jpg │ └── 8.jpg └── slider.tpl.html ├── angularjs_route2 ├── views │ ├── book.html │ └── chapter.html ├── scripts │ └── app.js └── angularjs_route.html ├── app_i18n ├── content │ ├── ico │ │ ├── favicon.ico │ │ ├── apple-touch-icon-114-precomposed.png │ │ ├── apple-touch-icon-144-precomposed.png │ │ ├── apple-touch-icon-57-precomposed.png │ │ └── apple-touch-icon-72-precomposed.png │ └── img │ │ ├── less-logo-large.png │ │ ├── grid-baseline-20px.png │ │ ├── glyphicons-halflings.png │ │ ├── bootstrap-mdo-sfmoma-01.jpg │ │ ├── bootstrap-mdo-sfmoma-02.jpg │ │ ├── bootstrap-mdo-sfmoma-03.jpg │ │ ├── bs-docs-twitter-github.png │ │ ├── bs-docs-masthead-pattern.png │ │ ├── responsive-illustrations.png │ │ ├── bs-docs-bootstrap-features.png │ │ ├── glyphicons-halflings-white.png │ │ └── bs-docs-responsive-illustrations.png ├── scripts │ ├── HomeController.js │ ├── EditPersonController.js │ ├── NewPersonController.js │ ├── app.js │ └── AppController.js ├── Partials │ ├── home.html │ └── form.html ├── index.html └── i18n │ ├── resources-locale_es.json │ ├── resources-locale_default.json │ ├── resources-locale_zh-CN.json │ └── resources-locale_es-es.json ├── angularjs_books └── AngularJS 进阶实践.pptx ├── minovate_page ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── views │ └── tmpl │ │ └── app.html └── index.html ├── angularjs_videoplayer └── assets │ ├── song.mp3 │ └── movie.webm ├── angularjs_route ├── views │ └── route │ │ ├── detail.html │ │ └── list.html ├── scripts │ ├── controllers.js │ └── app.js └── angularjs_route.html ├── angularjs_taxer ├── images │ └── tax_calculator.png ├── package.json └── README.md ├── angularjs_directive ├── views │ ├── mymenu_tpl.html │ ├── mymenu_tpl2.html │ ├── img_template.html │ ├── header.html │ └── footer.html └── angularjs_scope.html ├── angularjs_directive_listview └── views │ ├── logo_tpl.html │ ├── listitem_tpl.html │ ├── header_tpl.html │ └── footer_tpl.html ├── angularjs_uirouter ├── partial-home-list.html ├── partial-home.html ├── table-data.html └── partial-about.html ├── .gitignore ├── angularjs_treeData_demo ├── bootstrap-dist │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ └── npm.js └── treeData.css ├── angularjs_route_http ├── views │ ├── common │ │ └── alert.html │ └── route │ │ ├── movie_detail.html │ │ └── movie_list.html ├── scripts │ ├── controllers.js │ └── app.js ├── angularjs_route_http.html └── data │ └── movies.json ├── angularjs_ngRepeat └── js │ └── app.js ├── angularjs_uirouter_steps_demo ├── form-payment.html ├── form-profile.html ├── form-interests.html └── form.html ├── angularjs_maillist └── view │ ├── list.html │ └── detail.html ├── angularjs_controller ├── js │ └── app.js ├── angularjs_controller_timer2.html ├── angularjs_controller_timer.html ├── angularjs_controller_timer3.html ├── angularjs_controller2.html └── angularjs_controller_multiple.html ├── package.json ├── angularjs_nginclude ├── views │ └── header.html ├── angularjs_nginclude.html └── angularjs_nginclude2.html ├── angularjs_crud ├── assets │ ├── data │ │ └── users.json │ ├── tpl │ │ ├── lists.html │ │ ├── add-new.html │ │ └── edit.html │ └── js │ │ └── app.js └── index.html ├── angular_audio_demo └── views │ └── nprListItem.html ├── common └── header.html ├── angularjs_ngModelController └── asyncValidators │ └── app.js ├── angularjs_http_get_json_data └── data │ ├── posts.json │ └── tools.json ├── angularjs_timepicker └── views │ └── mydatepicker.html ├── angularjs_ngSanitize └── script.js ├── npm-debug.log ├── README.md ├── angularjs_proxy └── angularjs_proxy.html ├── angularjs-ng-select └── index.html ├── angularjs_filter └── angularjs_customize_filter.html ├── angularjs_module └── angularjs_module.html ├── angularjs_location └── index.html ├── angularjs_ioc └── angularjs_ioc.html ├── angularjs_service ├── angularjs_service.html └── angularjs_service2.html ├── angularjs_ngclass └── angularjs_ngclass.html ├── angularjs_service_controller_directive └── data │ └── photos.json ├── hello_angularjs └── angularjs_rootScope.html ├── angularjs_factory_service └── angularjs_factory_service.html ├── angularjs_autocomplete └── data │ └── citys.json ├── angularjs_directive_controller ├── angularjs_directive_contoller1_2.html ├── angularjs_directive_contoller.html └── angularjs_directive_contoller1.html ├── angularjs_event └── angularjs_click.html ├── angularjs_factory └── angularjs_factory.html ├── angularjs_form_validation └── angularjs_form_validation6.html ├── angularjs_ngsubmit └── angularjs_ngsubmit.html ├── angularjs_cookie └── angularjs_cookie.html └── angularjs_extention └── angularjs_extention.html /angularjs-douban-movie/assets/css/style.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/js/angular-1.3.15/version.txt: -------------------------------------------------------------------------------- 1 | 1.3.15 -------------------------------------------------------------------------------- /angularjs-tutorial/app.js: -------------------------------------------------------------------------------- 1 | angular.module('app', []); -------------------------------------------------------------------------------- /console_simple/scripts/views/fuhe/v1.html: -------------------------------------------------------------------------------- 1 |

V1

-------------------------------------------------------------------------------- /console_simple/scripts/views/fuhe/v2.html: -------------------------------------------------------------------------------- 1 |

V2

-------------------------------------------------------------------------------- /console_simple/scripts/views/fuhe/v3.html: -------------------------------------------------------------------------------- 1 |

V3

-------------------------------------------------------------------------------- /console_simple/scripts/views/login.html: -------------------------------------------------------------------------------- 1 |

Login

-------------------------------------------------------------------------------- /console_simple/scripts/views/account.html: -------------------------------------------------------------------------------- 1 |

Account

-------------------------------------------------------------------------------- /angularjs_ngtemplate/views/mycontent3.html: -------------------------------------------------------------------------------- 1 |

我是外部文件内容

-------------------------------------------------------------------------------- /console_simple/scripts/views/register.html: -------------------------------------------------------------------------------- 1 |

Register

-------------------------------------------------------------------------------- /angular_audio_player/bin/server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | python -m SimpleHTTPServer -------------------------------------------------------------------------------- /todos/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/todos/.DS_Store -------------------------------------------------------------------------------- /angularjs_app_site/README.md: -------------------------------------------------------------------------------- 1 | AngularJS示例,简单的登录注册,后期将加入后端实现,以及验证码 2 | 3 | 启动方式: 4 | #node client.js 5 | -------------------------------------------------------------------------------- /angularjs-douban-movie/src/sass/_modules.scss: -------------------------------------------------------------------------------- 1 | // 2 | 3 | @import "modules/common"; 4 | @import "modules/grid"; -------------------------------------------------------------------------------- /angularjs_login/p/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_login/p/img/bg.jpg -------------------------------------------------------------------------------- /angular_sliderjs/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angular_sliderjs/images/1.jpg -------------------------------------------------------------------------------- /angular_sliderjs/images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angular_sliderjs/images/2.jpg -------------------------------------------------------------------------------- /angular_sliderjs/images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angular_sliderjs/images/3.jpg -------------------------------------------------------------------------------- /angular_sliderjs/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angular_sliderjs/images/4.jpg -------------------------------------------------------------------------------- /angular_sliderjs/images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angular_sliderjs/images/5.jpg -------------------------------------------------------------------------------- /angular_sliderjs/images/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angular_sliderjs/images/6.jpg -------------------------------------------------------------------------------- /angular_sliderjs/images/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angular_sliderjs/images/7.jpg -------------------------------------------------------------------------------- /angular_sliderjs/images/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angular_sliderjs/images/8.jpg -------------------------------------------------------------------------------- /angularjs-douban-movie/src/sass/modules/_common.scss: -------------------------------------------------------------------------------- 1 | /* Layout 2 | ------------------------------------------*/ 3 | 4 | -------------------------------------------------------------------------------- /angularjs_route2/views/book.html: -------------------------------------------------------------------------------- 1 | controller: {{name}}
2 | Book Id: {{params.bookId}}
3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app_i18n/content/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/ico/favicon.ico -------------------------------------------------------------------------------- /angularjs_books/AngularJS 进阶实践.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_books/AngularJS 进阶实践.pptx -------------------------------------------------------------------------------- /minovate_page/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/minovate_page/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /angularjs_videoplayer/assets/song.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_videoplayer/assets/song.mp3 -------------------------------------------------------------------------------- /angularjs_login/login/info.html: -------------------------------------------------------------------------------- 1 |
2 |

我是登录过后内容

3 |
-------------------------------------------------------------------------------- /angularjs_videoplayer/assets/movie.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_videoplayer/assets/movie.webm -------------------------------------------------------------------------------- /app_i18n/content/img/less-logo-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/less-logo-large.png -------------------------------------------------------------------------------- /angularjs_route/views/route/detail.html: -------------------------------------------------------------------------------- 1 |
2 |

Route {{id}}: detail.html 返回

-------------------------------------------------------------------------------- /angularjs_taxer/images/tax_calculator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_taxer/images/tax_calculator.png -------------------------------------------------------------------------------- /app_i18n/content/img/grid-baseline-20px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/grid-baseline-20px.png -------------------------------------------------------------------------------- /minovate_page/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/minovate_page/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /minovate_page/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/minovate_page/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /angularjs-douban-movie/src/sass/_mixins.scss: -------------------------------------------------------------------------------- 1 | // 2 | 3 | @import "mixins/common"; 4 | @import "mixins/grid"; 5 | @import "mixins/grid-framework"; -------------------------------------------------------------------------------- /angularjs_directive/views/mymenu_tpl.html: -------------------------------------------------------------------------------- 1 |
2 |

{{title}}

3 | 4 |
-------------------------------------------------------------------------------- /angularjs_directive_listview/views/logo_tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
-------------------------------------------------------------------------------- /angularjs_uirouter/partial-home-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app_i18n/content/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /minovate_page/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/minovate_page/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /app_i18n/content/img/bootstrap-mdo-sfmoma-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/bootstrap-mdo-sfmoma-01.jpg -------------------------------------------------------------------------------- /app_i18n/content/img/bootstrap-mdo-sfmoma-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/bootstrap-mdo-sfmoma-02.jpg -------------------------------------------------------------------------------- /app_i18n/content/img/bootstrap-mdo-sfmoma-03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/bootstrap-mdo-sfmoma-03.jpg -------------------------------------------------------------------------------- /app_i18n/content/img/bs-docs-twitter-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/bs-docs-twitter-github.png -------------------------------------------------------------------------------- /angularjs_login/toto_change.txt: -------------------------------------------------------------------------------- 1 | 现在不知道怎么在点击“下一步”时 2 | 替换index.html里的ui-view 3 | 4 | 我用了取巧的方法,在login里添加ui-view 5 | 6 | 求如何实现 index.html 里的ui-view替换成info.html -------------------------------------------------------------------------------- /app_i18n/content/img/bs-docs-masthead-pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/bs-docs-masthead-pattern.png -------------------------------------------------------------------------------- /app_i18n/content/img/responsive-illustrations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/responsive-illustrations.png -------------------------------------------------------------------------------- /angularjs_route2/views/chapter.html: -------------------------------------------------------------------------------- 1 | controller: {{name}}
2 | Book Id: {{params.bookId}}
3 | Chapter Id: {{params.chapterId}} 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app_i18n/content/img/bs-docs-bootstrap-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/bs-docs-bootstrap-features.png -------------------------------------------------------------------------------- /app_i18n/content/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /minovate_page/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/minovate_page/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /minovate_page/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/minovate_page/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /minovate_page/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/minovate_page/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /app_i18n/content/ico/apple-touch-icon-114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/ico/apple-touch-icon-114-precomposed.png -------------------------------------------------------------------------------- /app_i18n/content/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /app_i18n/content/ico/apple-touch-icon-57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/ico/apple-touch-icon-57-precomposed.png -------------------------------------------------------------------------------- /app_i18n/content/ico/apple-touch-icon-72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/ico/apple-touch-icon-72-precomposed.png -------------------------------------------------------------------------------- /app_i18n/content/img/bs-docs-responsive-illustrations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/app_i18n/content/img/bs-docs-responsive-illustrations.png -------------------------------------------------------------------------------- /console_simple/scripts/views/fuhe/main.html: -------------------------------------------------------------------------------- 1 |
2 | v1 3 |
4 |
5 | v2 6 |
7 |
8 | v3 9 |
-------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | /.idea/ 3 | /angularjs-douban-movie/node_modules 4 | /angularjs_ngModelController/asyncValidators/node_modules 5 | -------------------------------------------------------------------------------- /angularjs_login/p/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_login/p/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /angularjs_login/p/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_login/p/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /angularjs_login/p/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_login/p/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /angularjs_directive/views/mymenu_tpl2.html: -------------------------------------------------------------------------------- 1 |
2 | {{menu}} 3 | 4 |
-------------------------------------------------------------------------------- /angularjs_login/p/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_login/p/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /angularjs_treeData_demo/bootstrap-dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_treeData_demo/bootstrap-dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /angularjs_treeData_demo/bootstrap-dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_treeData_demo/bootstrap-dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /angularjs_treeData_demo/bootstrap-dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_treeData_demo/bootstrap-dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /angularjs_treeData_demo/bootstrap-dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukeddy/angular_train/HEAD/angularjs_treeData_demo/bootstrap-dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /angularjs_route/views/route/list.html: -------------------------------------------------------------------------------- 1 |
2 |

Route : List.html

3 |
{{title}}
4 | -------------------------------------------------------------------------------- /angularjs_route_http/views/common/alert.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | {{msg}} 5 |
6 |
-------------------------------------------------------------------------------- /angularjs-tutorial/README.md: -------------------------------------------------------------------------------- 1 | angularjs-tutorial 2 | ================== 3 | 4 | Learn AngularJS in 30 minutes with this simple tutorial: [AngularJS Tutorial](http://www.revillweb.com/tutorials/angularjs-in-30-minutes-angularjs-tutorial/). 5 | -------------------------------------------------------------------------------- /angularjs_treeData_demo/treeData.css: -------------------------------------------------------------------------------- 1 | .tree li { 2 | cursor: pointer; 3 | padding-left: 1.3em; 4 | } 5 | 6 | .tree ul { 7 | list-style: none; 8 | padding-left: 0; 9 | } 10 | 11 | .intermediate { 12 | opacity: 0.4; 13 | } -------------------------------------------------------------------------------- /angularjs-douban-movie/src/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | @import "variables"; 3 | @import "mixins"; 4 | 5 | @import "vendor/normalize"; 6 | @import "vendor/off-canvas"; 7 | 8 | @import "modules"; 9 | 10 | //import pages 11 | @import "pages/common"; -------------------------------------------------------------------------------- /angularjs_ngRepeat/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Administrator on 15-3-5. 3 | */ 4 | var myApp = angular.module('myApp', []); //注意app创建时需要添加第二个参数 5 | 6 | myApp.controller('MainController',function($scope,$timeout){ 7 | //TODO logic 8 | }); -------------------------------------------------------------------------------- /angularjs_route/scripts/controllers.js: -------------------------------------------------------------------------------- 1 | routeApp.controller('RouteListCtl',function($scope) { 2 | $scope.title="列表标题"; 3 | }); 4 | routeApp.controller('RouteDetailCtl',function($scope, $routeParams) { 5 | $scope.id = $routeParams.id; 6 | }); -------------------------------------------------------------------------------- /angularjs_directive/views/img_template.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
-------------------------------------------------------------------------------- /angularjs_uirouter_steps_demo/form-payment.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |

Thanks For Your Money!

4 | 5 | 6 |
-------------------------------------------------------------------------------- /angularjs_app_site/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular app", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "express": "4.x", 6 | "morgan": "latest" 7 | }, 8 | "engines": { 9 | "node": ">=0.10.0" 10 | } 11 | } -------------------------------------------------------------------------------- /angularjs-douban-movie/src/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular main file 3 | * Created by chenzhen on 15/12/14. 4 | */ 5 | (function(){ 6 | angular.module('indigo', [ 7 | 'ui.router', 8 | 'ngAnimate', 9 | 'cn.offCanvas', 10 | ]) 11 | })(); -------------------------------------------------------------------------------- /angularjs-douban-movie/src/js/controllers/DetailController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chenzhen on 15/12/16. 3 | */ 4 | angular.module('indigo').controller('DetailController', function ($scope, Jsonp, MovieService, demoOffCanvas) { 5 | this.toggle = demoOffCanvas.toggle; 6 | }) -------------------------------------------------------------------------------- /app_i18n/scripts/HomeController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains WebStorm. 3 | * User: jim.lavin 4 | * Date: 12/8/12 5 | * Time: 12:26 PM 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | 9 | 'use strict' 10 | 11 | function HomeController($scope) { 12 | } -------------------------------------------------------------------------------- /angularjs_taxer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "taxer", 3 | "version": "1.0.0", 4 | "description": "税收计算器", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "dev": "browser-sync start --server --files *.*" 9 | }, 10 | "author": "tangzq", 11 | "license": "" 12 | } 13 | -------------------------------------------------------------------------------- /static/js/angular-1.3.15/version.json: -------------------------------------------------------------------------------- 1 | {"raw":"v1.3.15","major":1,"minor":3,"patch":15,"prerelease":[],"build":[],"version":"1.3.15","codeName":"locality-filtration","full":"1.3.15","branch":"v1.3.x","cdn":{"raw":"v1.3.14","major":1,"minor":3,"patch":14,"prerelease":[],"build":[],"version":"1.3.14","docsUrl":"http://code.angularjs.org/1.3.14/docs"}} -------------------------------------------------------------------------------- /angularjs_maillist/view/list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
发件人主题发送时间
{{message.sender}}{{message.subject}}{{message.date}}
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /static/js/angular-1.3.15/angular-csp.css: -------------------------------------------------------------------------------- 1 | /* Include this file in your html if you are using the CSP mode. */ 2 | 3 | @charset "UTF-8"; 4 | 5 | [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], 6 | .ng-cloak, .x-ng-cloak, 7 | .ng-hide:not(.ng-hide-animate) { 8 | display: none !important; 9 | } 10 | 11 | ng\:form { 12 | display: block; 13 | } 14 | -------------------------------------------------------------------------------- /angularjs_uirouter/partial-home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

The Homey Page

5 |

This page demonstrates nested views.

6 | 7 | List 8 | Paragraph 9 |
10 | 11 |
-------------------------------------------------------------------------------- /console_simple/scripts/views/scopewatch.html: -------------------------------------------------------------------------------- 1 |
2 | 7 |
8 |
9 | {{count}} 10 |
11 |
-------------------------------------------------------------------------------- /angularjs-douban-movie/README.md: -------------------------------------------------------------------------------- 1 | 如何运行: 2 | 1、首先安装gulp,具体参考官方文档(http://www.gulpjs.com.cn/) 3 | #npm install --global gulp或者npm install --save-dev gulp 4 | 2、运行gulp命令打包程序(gulp默认会执行default指令) 5 | #gulp 6 | 3、将构建完后的程序index.html,assets,ngviews部署到服务器上即可访问 7 | 8 | TODO: 9 | 使用node创建服务器,使本项目可以在node中运行并访问 10 | 11 | 12 | 13 | 参考: 14 | [angular-douban-movie](https://github.com/bluewind86/angular-douban-movie) 15 | -------------------------------------------------------------------------------- /angularjs_taxer/README.md: -------------------------------------------------------------------------------- 1 | AngularJS Invoice计算器,基于:https://github.com/metaware/angular-invoicing修改 2 | 3 | 本示例使用了browsersync进行同步测试,所以需要安装以下软件: 4 | node,browsersync 5 | 6 | 启动方式: 7 | #npm run dev或者browser-sync start --server --files *.* 8 | 9 | 打开浏览器测试 http://localhost:3000/ 10 | 11 | 12 | 效果图: 13 | ![](https://github.com/tzq668766/screenshots/blob/master/angularjs_train_screenshots/tax_calculator.png) 14 | -------------------------------------------------------------------------------- /angularjs_controller/js/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Administrator on 15-3-5. 3 | */ 4 | var myApp = angular.module('myApp', []); //注意app创建时需要添加第二个参数 5 | 6 | myApp.controller('TimerController',function($scope,$timeout){ 7 | var updateClock=function(){ 8 | $scope.clock=new Date(); 9 | $timeout(function(){ 10 | updateClock(); 11 | },1000); 12 | }; 13 | updateClock(); 14 | }); -------------------------------------------------------------------------------- /angularjs_uirouter/table-data.html: -------------------------------------------------------------------------------- 1 |

Fine Scotches

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
NameCost
{{ scotch.name }}${{ scotch.price }}
-------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "learn-angularjs", 3 | "version": "1.0.0", 4 | "description": "This is a project just for angular protice,如何配置参数请参考 https://www.browsersync.io/docs/options/", 5 | "main": "index.js", 6 | "scripts": { 7 | "learn-angular-dev": "browser-sync start --server --files \"*.*\"" 8 | }, 9 | "author": "tangzq", 10 | "license": "MIT", 11 | "dependencies": { 12 | "browser-sync": "^2.8.2" 13 | } 14 | } -------------------------------------------------------------------------------- /angularjs_app_site/client.js: -------------------------------------------------------------------------------- 1 | var express = require("express"); 2 | var morgan = require("morgan"); 3 | var app = express(); 4 | 5 | var port = process.env.PORT || 3000; 6 | 7 | app.use(morgan("dev")); 8 | app.use(express.static("./app")); 9 | 10 | app.get("/", function(req, res) { 11 | res.sendFile("./app/index.html"); 12 | }); 13 | 14 | //启动服务器 15 | app.listen(port, function () { 16 | console.log( "服务启动,端口" + port); 17 | }); -------------------------------------------------------------------------------- /angularjs_directive_listview/views/listitem_tpl.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | {{ngModel.num}} 4 |
5 |
6 | 7 | 8 |
9 |
10 | {{ngModel.title}} 11 |
12 |
-------------------------------------------------------------------------------- /angularjs_route_http/views/route/movie_detail.html: -------------------------------------------------------------------------------- 1 |
2 |

电影详情介绍,返回电影列表

3 |
4 |
{{appname}}
5 |
6 |
{{movie.title}}
7 |

{{movie.desc}}

8 |

9 | 10 |

11 |
12 |
-------------------------------------------------------------------------------- /angularjs_directive/views/header.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angularjs_nginclude/views/header.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /minovate_page/views/tmpl/app.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /angularjs_crud/assets/data/users.json: -------------------------------------------------------------------------------- 1 | { 2 | "users":[ 3 | { 4 | "username":"zhangsan", 5 | "first_name":"张", 6 | "last_name":"三", 7 | "address":"成都天府软件园地址1" 8 | }, 9 | { 10 | "username":"lisi", 11 | "first_name":"李", 12 | "last_name":"四", 13 | "address":"成都天府软件园地址2" 14 | }, 15 | { 16 | "username": "wangwu", 17 | "first_name": "王", 18 | "last_name": "五", 19 | "address": "成都天府软件园地址3" 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /angularjs-douban-movie/ngviews/home/default.html: -------------------------------------------------------------------------------- 1 |
2 | 10 |
-------------------------------------------------------------------------------- /angular_audio_demo/views/nprListItem.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 |
6 |
7 |
8 | {{ngModel.title.$text}} 9 |
10 |
Link
11 |
-------------------------------------------------------------------------------- /todos/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "todos", 3 | "version": "1.0.0", 4 | "description": "express mongo angular todo project", 5 | "main": "server.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "tangzhiqiang", 10 | "dependencies":{ 11 | "body-parser" : "^1.4.3", 12 | "express" : "^4.13.4", 13 | "method-override": "^2.1.3", 14 | "mongoose" : "^4.4.12", 15 | "morgan" : "^1.1.1" 16 | }, 17 | "license": "MIT" 18 | } 19 | -------------------------------------------------------------------------------- /common/header.html: -------------------------------------------------------------------------------- 1 |
2 | 13 |
-------------------------------------------------------------------------------- /angularjs_app_site/app/views/home.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 |
6 |

在本示例中你将看到下面内容

7 |
    8 |
  • 登录
  • 9 |
  • 注册
  • 10 |
  • 登出
  • 11 |
  • 登录后查看“个人信息”
  • 12 |
13 |
14 |
15 |
16 |
-------------------------------------------------------------------------------- /angularjs_directive_listview/views/header_tpl.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angularjs_route/scripts/app.js: -------------------------------------------------------------------------------- 1 | var routeApp = angular.module('routeApp',['ngRoute']); 2 | routeApp.config(['$routeProvider',function ($routeProvider) { 3 | $routeProvider 4 | .when('/list', { 5 | templateUrl: 'views/route/list.html', 6 | controller: 'RouteListCtl' 7 | }) 8 | .when('/list/:id', { 9 | templateUrl: 'views/route/detail.html', 10 | controller: 'RouteDetailCtl' 11 | }) 12 | .otherwise({ 13 | redirectTo: '/list' 14 | }); 15 | }]); 16 | -------------------------------------------------------------------------------- /static/js/angular-growl/angular-growl.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-growl - v0.4.0 - 2013-11-19 3 | * https://github.com/marcorinck/angular-growl 4 | * Copyright (c) 2013 Marco Rinck; Licensed MIT 5 | */ 6 | 7 | .growl{position:fixed;top:10px;right:10px;float:right;width:250px}.growl-item.ng-enter,.growl-item.ng-leave{-webkit-transition:.5s linear all;-moz-transition:.5s linear all;-o-transition:.5s linear all;transition:.5s linear all}.growl-item.ng-enter,.growl-item.ng-leave.ng-leave-active{opacity:0}.growl-item.ng-leave,.growl-item.ng-enter.ng-enter-active{opacity:1} -------------------------------------------------------------------------------- /angularjs_login/p/bootstrap-3.3.5/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /angularjs_treeData_demo/bootstrap-dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /app_i18n/scripts/EditPersonController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains WebStorm. 3 | * User: jim.lavin 4 | * Date: 12/8/12 5 | * Time: 1:49 PM 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | 9 | 10 | 'use strict' 11 | 12 | function EditPersonController($scope, $location, $routeParams) { 13 | $scope.person = $scope.People[$routeParams.index]; 14 | 15 | $scope.savePerson = function() { 16 | $location.path('/'); 17 | }; 18 | 19 | $scope.cancel = function() { 20 | $location.path('/'); 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /angularjs_crud/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJs 6 | 7 | 8 | 9 |
10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /angularjs_uirouter/partial-about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |

The About Page

5 |

This page demonstrates multiple and named views.

6 |
7 | 8 |
9 | 10 | 11 |
12 |
13 |
14 | 15 | 16 |
17 |
18 |
19 | 20 |
-------------------------------------------------------------------------------- /angular_audio_player/views/playerView.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 |
6 | 7 |
8 |
{{ title }}
9 | 10 |
11 |
12 | 13 |
14 |
15 |
16 | 17 |
-------------------------------------------------------------------------------- /app_i18n/scripts/NewPersonController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains WebStorm. 3 | * User: jim.lavin 4 | * Date: 12/8/12 5 | * Time: 1:49 PM 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | 9 | 'use strict' 10 | 11 | function NewPersonController($scope, $location) { 12 | $scope.person = {FirstName: '', LastName: '', Email: '', Bio: ''}; 13 | 14 | $scope.savePerson = function() { 15 | $scope.People.push($scope.person); 16 | $location.path('/'); 17 | }; 18 | 19 | $scope.cancel = function() { 20 | $location.path('/'); 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /angular_audio_player/views/nprListItem.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angularjs_route_http/views/route/movie_list.html: -------------------------------------------------------------------------------- 1 |
2 |

电影列表

3 |
4 |
{{appname}}
5 |
6 |
7 | 8 |

{{movie.title}}

9 |
10 |

{{movie.title}}

11 |

{{movie.desc}}

12 |
13 |
14 |
-------------------------------------------------------------------------------- /angularjs_uirouter_steps_demo/form-profile.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 | 6 |
7 | 8 | 9 |
10 | 11 |
12 |
13 | 14 | Next Section 15 | 16 |
17 |
-------------------------------------------------------------------------------- /todos/README.md: -------------------------------------------------------------------------------- 1 | 这是一个简单的TODO项目 2 | 3 | 技术栈:nodejs,express,mongoose,angular 4 | 5 | 运行: 6 | 1.确保已经安装了node和npm环境 7 | 8 | 2.进入根目录执行 9 | npm install //安装依赖 10 | node server.js //启动服务器 11 | 12 | 3.浏览器打开http://localhost:3000测试 13 | 14 | 15 | 其他:我这里使用了node动态加载模块nodemon,这样每次服务器文件发生更改的时候就会自动加载,方便开发。nodemon使用方法: 16 | 1.全局安装nodemon模块 17 | npm install -g nodemon 18 | 2.使用nodemon启动服务器 19 | nodemon server.js 20 | 21 | node热更新模块推荐: 22 | https://github.com/isaacs/node-supervisor 23 | https://github.com/remy/nodemon 24 | https://github.com/nodejitsu/forever 25 | 26 | 截图: 27 | ![](https://github.com/tzq668766/screenshots/blob/master/angularjs_train_screenshots/node_angular_todo.png) 28 | -------------------------------------------------------------------------------- /angularjs-douban-movie/src/js/routes.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chenzhen on 15/12/14. 3 | */ 4 | 5 | function config($stateProvider, $urlRouterProvider , $httpProvider){ 6 | 7 | //default route 8 | $urlRouterProvider.otherwise("/home/"); 9 | 10 | $stateProvider 11 | //index page 12 | .state('home', { 13 | abstract: true, 14 | url: '/home', 15 | templateUrl: "ngviews/common/layout.html" 16 | }) 17 | .state('home.default', { 18 | url:'/', 19 | templateUrl: "ngviews/home/default.html", 20 | data: {pageTitle: '首页'} 21 | }) 22 | } 23 | 24 | angular 25 | .module('indigo') 26 | .config(config) 27 | .run() -------------------------------------------------------------------------------- /angularjs_crud/assets/tpl/lists.html: -------------------------------------------------------------------------------- 1 |

Users

2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
UsernameFirst NameLast NameAddressOptions
{{user.username}}{{user.first_name}}{{user.last_name}}{{user.address}}
22 | Add New User -------------------------------------------------------------------------------- /angularjs-douban-movie/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-seed", 3 | "version": "1.0.0", 4 | "description": "angular seed", 5 | "main": "index.js", 6 | "dependencies": { 7 | "ejs": "^2.4.1", 8 | "express": "^4.13.4" 9 | }, 10 | "devDependencies": { 11 | "gulp-concat": "^2.6.0", 12 | "gulp-minify-css": "^1.2.2", 13 | "gulp-ng-annotate": "^1.1.0", 14 | "gulp-rename": "^1.2.2", 15 | "gulp-ruby-sass": "^2.0.6", 16 | "gulp-sass": "^2.1.1", 17 | "gulp-uglify": "^1.5.1" 18 | }, 19 | "scripts": { 20 | "test": "echo \"Error: no test specified\" && exit 1" 21 | }, 22 | "keywords": [ 23 | "angular", 24 | "seed" 25 | ], 26 | "author": "chenz", 27 | "license": "ISC" 28 | } 29 | -------------------------------------------------------------------------------- /angularjs_app_site/app/views/profile.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 8 |
9 |
10 |

{{myDetails.data.email}}

11 |

{{myDetails.data.password}}

12 |
13 |
14 |
15 |
-------------------------------------------------------------------------------- /angularjs-douban-movie/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /angularjs_ngModelController/asyncValidators/app.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var app = express(); 3 | 4 | app.use(express.static(__dirname+'')); 5 | app.use(express.bodyParser()); 6 | app.use(express.methodOverride()); 7 | 8 | var names = [ 9 | 'code_bunny','mi_bunny','hua_bunny' 10 | ]; 11 | 12 | app.get('/api/users/:name',function(req,res){ 13 | setTimeout(function(){ 14 | var name = req.params.name; 15 | names.forEach(function(list){ 16 | if(name==list) { 17 | res.send(list); 18 | } 19 | else { 20 | res.end() 21 | } 22 | }); 23 | },1000); 24 | }); 25 | 26 | app.listen(9000); 27 | console.log("server started on port 9000"); 28 | 29 | -------------------------------------------------------------------------------- /app_i18n/scripts/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains WebStorm. 3 | * User: jim.lavin 4 | * Date: 12/8/12 5 | * Time: 11:49 AM 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | 9 | 'use strict'; 10 | 11 | /* App Module */ 12 | 13 | angular.module('localizeApp', ['localization','ui.bootstrap','ngResource','ngRoute']). 14 | config(['$routeProvider', function ($routeProvider) { 15 | $routeProvider. 16 | when('/', {templateUrl:'views/home.html', controller:HomeController}). 17 | when('/edit/:index', {templateUrl:'views/form.html', controller:EditPersonController}). 18 | when('/new', {templateUrl:'views/form.html', controller:NewPersonController}). 19 | otherwise({redirectTo:'/'}); 20 | }]); -------------------------------------------------------------------------------- /console_simple/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Demo 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /angular_audio_player/README.md: -------------------------------------------------------------------------------- 1 | Beginner series 2 | -------- 3 | 4 | The official repository of the ng-newsletter beginner series. 5 | 6 | To start the app, you'll need to have `python` installed. Simply run the server script: 7 | 8 | ./bin/server.sh 9 | 10 | You'll now be serving this repository at http://localhost:8080, so open that up in your browser. 11 | 12 | * [part 1](http://www.ng-newsletter.com/posts/beginner2expert-how_to_start.html) in the part1 branch. 13 | * [part 2](http://www.ng-newsletter.com/posts/beginner2expert-scopes.html) in the part2 branch. 14 | * [part 3](http://www.ng-newsletter.com/posts/beginner2expert-data-binding.html) in the part3 branch. 15 | * [part 4 and 5](http://www.ng-newsletter.com/posts/beginner2expert-directives.html) in the part5 branch. 16 | 17 | -------------------------------------------------------------------------------- /angularjs_uirouter_steps_demo/form-interests.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 8 |
9 |
10 | 14 |
15 |
16 | 17 |
18 |
19 | 20 | Next Section 21 | 22 |
23 |
-------------------------------------------------------------------------------- /angularjs_maillist/view/detail.html: -------------------------------------------------------------------------------- 1 |
2 |
主题:
3 |
{{message.subject}}
4 | 5 |
发件人:
6 |
{{message.sender}}
7 | 8 |
发送时间:
9 |
{{message.date}}
10 |
11 |
接收人:
12 |
13 | {{name}}, 14 |
15 |
{{message.content}}
16 |
17 | 返回列表 18 |
19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /angularjs_login/login/login.html: -------------------------------------------------------------------------------- 1 |
2 |
系统登录
3 |
4 |
5 |
6 | 7 | 8 |
9 | 10 |
11 | 12 | 13 |
14 |
15 | 下一步 16 |
17 |
18 |
19 |
20 |
-------------------------------------------------------------------------------- /angularjs-douban-movie/ngviews/common/layout.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 12 |
13 |
14 |
15 | -------------------------------------------------------------------------------- /angularjs_http_get_json_data/data/posts.json: -------------------------------------------------------------------------------- 1 | { 2 | "posts": [ 3 | { 4 | "title": "Hello ,title1", 5 | "desc": "Hello ,this is desceiption" 6 | }, 7 | { 8 | "title": "Hello ,title2", 9 | "desc": "Hello ,this is desceiption" 10 | }, 11 | { 12 | "title": "Hello ,title3", 13 | "desc": "Hello ,this is desceiption" 14 | }, 15 | { 16 | "title": "Hello ,title4", 17 | "desc": "Hello ,this is desceiption" 18 | }, 19 | { 20 | "title": "Hello ,title5", 21 | "desc": "Hello ,this is desceiption" 22 | }, 23 | { 24 | "title": "Hello ,title6", 25 | "desc": "Hello ,this is desceiption" 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /angularjs-douban-movie/src/js/directives/directives.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chenzhen on 15/12/14. 3 | */ 4 | 5 | 6 | function pageTitle($rootScope, $timeout){ 7 | return { 8 | link: function(scope, element) { 9 | var listener = function(event, toState) { 10 | // Default title 11 | var title = 'Indigo | Angular Seed'; 12 | // Create your own title pattern 13 | if (toState.data && toState.data.pageTitle) title = 'Indigo | ' + toState.data.pageTitle; 14 | $timeout(function() { 15 | element.text(title); 16 | }); 17 | }; 18 | $rootScope.$on('$stateChangeStart', listener); 19 | } 20 | } 21 | }; 22 | 23 | 24 | angular 25 | .module('indigo') 26 | .directive('pageTitle', pageTitle) -------------------------------------------------------------------------------- /angular_sliderjs/slider.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 | 7 | 8 | 9 |
10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |
-------------------------------------------------------------------------------- /static/js/angular-1.3.15/angular-cookies.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | AngularJS v1.3.15 3 | (c) 2010-2014 Google, Inc. http://angularjs.org 4 | License: MIT 5 | */ 6 | (function(p,f,n){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(e,b){var c={},g={},h,k=!1,l=f.copy,m=f.isUndefined;b.addPollFn(function(){var a=b.cookies();h!=a&&(h=a,l(a,g),l(a,c),k&&e.$apply())})();k=!0;e.$watch(function(){var a,d,e;for(a in g)m(c[a])&&b.cookies(a,n);for(a in c)d=c[a],f.isString(d)||(d=""+d,c[a]=d),d!==g[a]&&(b.cookies(a,d),e=!0);if(e)for(a in d=b.cookies(),c)c[a]!==d[a]&&(m(d[a])?delete c[a]:c[a]=d[a])});return c}]).factory("$cookieStore", 7 | ["$cookies",function(e){return{get:function(b){return(b=e[b])?f.fromJson(b):b},put:function(b,c){e[b]=f.toJson(c)},remove:function(b){delete e[b]}}}])})(window,window.angular); 8 | //# sourceMappingURL=angular-cookies.min.js.map 9 | -------------------------------------------------------------------------------- /angularjs_timepicker/views/mydatepicker.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 | 6 | 7 | 8 | 9 |
10 |
11 |
12 | 13 |
14 | 15 |
16 |
17 |
-------------------------------------------------------------------------------- /angularjs_route_http/scripts/controllers.js: -------------------------------------------------------------------------------- 1 | routeApp.controller('MovieListController',function($scope,$http){ 2 | $http.get('data/movies.json').success(function(data, status, headers, config) { 3 | console.log(data.movies); 4 | $scope.movieList = data.movies; 5 | }).error(function(data, status, headers, config) { 6 | //alert("获取电影列表信息失败!"); 7 | $scope.hasError=true; 8 | $scope.msg="获取电影列表信息失败!"; 9 | }); 10 | }); 11 | routeApp.controller('MovieDetailController',function($scope,$http,$routeParams){ 12 | $http.get('data/movies.json').success(function(data, status, headers, config) { 13 | console.log(data.movies); 14 | $scope.movie= data.movies[$routeParams.id]; 15 | }).error(function(data, status, headers, config) { 16 | //alert("获取电影详情失败!"); 17 | $scope.hasError=true; 18 | $scope.msg="获取电影详情失败!"; 19 | }); 20 | }); -------------------------------------------------------------------------------- /angularjs-douban-movie/src/js/controllers/MainController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chenzhen on 15/12/14. 3 | */ 4 | 5 | angular.module('indigo').controller('MainController', function ($scope, $rootScope, Jsonp, $q, MovieService, demoOffCanvas) { 6 | 7 | //this.getMovies('in_theaters'); 8 | 9 | this.toggle = demoOffCanvas.toggle; 10 | $rootScope.movie = {}; 11 | 12 | $scope.getMovies = function(type){ 13 | MovieService.getMovies(type).then(function(data){ 14 | $scope.movies = data; 15 | },function(){ 16 | alert('拉取数据失败!'); 17 | }); 18 | } 19 | 20 | this.openDetail = function(id){ 21 | demoOffCanvas.toggle(); 22 | MovieService.getDetail(id).then(function(data){ 23 | console.log(data); 24 | $rootScope.movie = data; 25 | },function(){ 26 | alert('拉取数据失败!'); 27 | }); 28 | } 29 | 30 | }); 31 | -------------------------------------------------------------------------------- /angularjs-douban-movie/src/js/services/CommonService.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chenzhen on 15/12/14. 3 | */ 4 | 5 | angular.module('indigo').factory('Jsonp',function(){ 6 | return { 7 | get: function(url, callback){ 8 | var script = document.createElement('script'); 9 | script.type = "text/javascript"; 10 | script.src = url + (url.indexOf('?') > 0 ? '&' : '?') + 'callback=CB&' + Date.now(); 11 | script.onload=function(){ 12 | script.parentNode.removeChild(script); 13 | }; 14 | window['CB'] = function (json) { 15 | callback(json); 16 | }; 17 | document.head.appendChild(script); 18 | }, 19 | } 20 | }); 21 | 22 | angular.module('indigo').factory('demoOffCanvas', function(cnOffCanvas){ 23 | return cnOffCanvas({ 24 | templateUrl: 'ngviews/home/detail.html' 25 | }) 26 | }) -------------------------------------------------------------------------------- /app_i18n/Partials/home.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
-------------------------------------------------------------------------------- /angularjs_ngSanitize/script.js: -------------------------------------------------------------------------------- 1 | var app =angular.module('myApp',['ngSanitize']); 2 | app.controller('ctrl',function($scope,$sce){ 3 | $scope.myHtml = '

an html\n' + 4 | 'click here\n' + 5 | 'snippet

'; 6 | $scope.trustHtml = $sce.trustAsHtml($scope.myHtml) 7 | }); 8 | 9 | app.controller('ctrlLinky',function($scope,$sce,$filter){ 10 | $scope.myHtml = '

'+ 11 | '下面这些都应该是链接:\n'+ 12 | 'http://angularjs.org/,\n'+ 13 | 'mailto:us@somewhere.org,\n'+ 14 | 'another@somewhere.org,\n'+ 15 | 'and one more: ftp://127.0.0.1/.\n'+ 16 | '

'; 17 | console.log($filter('linky')($scope.myHtml,'_blank')) 18 | }); 19 | /* 20 | 1.ngSanitize添加了$sanitize服务,但这个服务是不出现在代码里的,它的出现的作用就是使得html里面可以使用ng-bind-html这个指令,能够把ng-bind-html绑定的内容进行安全编译 21 | 安全编译的方法就是移除html上的所有属性,是所有属性,包括事件绑定,样式,等一切.仅仅保留html标签和内容. 22 | 2.如果是要改变其默认的编译方式,应该使用$sce服务.$sce服务是不依赖任何东西的. 23 | 3.如果使用了$sce来编译了html字符串,那么即使不添加ngSanitize也可以使用ng-bind-html. 24 | 4.如果既不添加ngSanitize,又不使用$sce来编译html字符串,直接在html里使用ng-bind-html,是不行的. 25 | */ 26 | -------------------------------------------------------------------------------- /console_simple/scripts/views/main.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

Angular Demo

5 |
6 | Login - 7 | Register - Account - 复合型ui-view - 9 | Default 10 |
11 | 监控 $scope.result 12 |
13 |
14 |
15 | Body 16 |
17 |
18 |
19 | Footer 20 |
21 | 想往哪里跳就点哪里-> Login - Register ..... 22 |
23 |
24 |
-------------------------------------------------------------------------------- /npm-debug.log: -------------------------------------------------------------------------------- 1 | 0 info it worked if it ends with ok 2 | 1 verbose cli [ 'D:\\Program Files\\nodejs\\\\node.exe', 3 | 1 verbose cli 'D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 4 | 1 verbose cli 'run', 5 | 1 verbose cli 'dev' ] 6 | 2 info using npm@1.4.23 7 | 3 info using node@v0.10.31 8 | 4 verbose node symlink D:\Program Files\nodejs\\node.exe 9 | 5 error Failed to parse json 10 | 5 error Unexpected token / 11 | 6 error File: E:\TODOs\angularjs\angular_train\package.json 12 | 7 error Failed to parse package.json data. 13 | 7 error package.json must be actual JSON, not just JavaScript. 14 | 7 error 15 | 7 error This is not a bug in npm. 16 | 7 error Tell the package author to fix their package.json file. JSON.parse 17 | 8 error System Windows_NT 6.1.7601 18 | 9 error command "D:\\Program Files\\nodejs\\\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev" 19 | 10 error cwd E:\TODOs\angularjs\angular_train 20 | 11 error node -v v0.10.31 21 | 12 error npm -v 1.4.23 22 | 13 error file E:\TODOs\angularjs\angular_train\package.json 23 | 14 error code EJSONPARSE 24 | 15 verbose exit [ 1, true ] 25 | -------------------------------------------------------------------------------- /angularjs_app_site/app/js/lib/ngStorage.js: -------------------------------------------------------------------------------- 1 | /*! ngStorage 0.3.0 | Copyright (c) 2013 Gias Kay Lee | MIT License */"use strict";!function(){function a(a){return["$rootScope","$window",function(b,c){for(var d,e,f,g=c[a]||(console.warn("This browser does not support Web Storage!"),{}),h={$default:function(a){for(var b in a)angular.isDefined(h[b])||(h[b]=a[b]);return h},$reset:function(a){for(var b in h)"$"===b[0]||delete h[b];return h.$default(a)}},i=0;iAdd new user 2 |
3 |
4 |
5 |
6 | 7 | 8 |
9 |
10 | 11 | 12 |
13 |
14 | 15 | 16 |
17 |
18 | 19 | 20 |
21 | 22 | Cancel 23 |
24 |
25 |
-------------------------------------------------------------------------------- /angularjs_http_get_json_data/data/tools.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "thumburl": "http://pica.nipic.com/2007-07-11/20077111172223_2.jpg", 4 | "title": "Tool One", 5 | "desc": "Hello ,this is desceiption" 6 | }, 7 | { 8 | "thumburl": "http://static.freepik.com/free-photo/tools_17-914145935.jpg", 9 | "title": "Tool Two", 10 | "desc": "Hello ,this is desceiption" 11 | }, 12 | { 13 | "thumburl": "http://img5.imgtn.bdimg.com/it/u=501512941,578051938&fm=21&gp=0.jpg", 14 | "title": "Hello ,Three", 15 | "desc": "Hello ,this is desceiption" 16 | }, 17 | { 18 | "thumburl": "http://pic1.ooopic.com/uploadfilepic/shiliang/2009-09-08/OOOPIC_00cyl_20090908e5e84afe3fdbe890.jpg", 19 | "title": "Hello ,Fore", 20 | "desc": "Hello ,this is desceiption" 21 | }, 22 | { 23 | "thumburl": "http://static.freepik.com/free-photo/tools_17-914145935.jpg", 24 | "title": "Hello ,title5", 25 | "desc": "Hello ,this is desceiption" 26 | }, 27 | { 28 | "thumburl": "http://pic21.nipic.com/20120511/8133282_114016004302_2.jpg", 29 | "title": "Hello ,title6", 30 | "desc": "Hello ,this is desceiption" 31 | } 32 | ] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # angular_train 2 | AngularJS练习项目 3 | # 如何运行? 4 | 1、安装nodejs和browsersync,具体怎么安装请参考:http://www.browsersync.cn/#install 5 | 6 | 2、启动browsersync 7 | npm run learn-angular-dev /*这里的dev是package.json文件中设置的*/ 8 | 9 | 3、打开浏览器测试 10 | http://localhost:3000/test.html 11 | 12 | 13 | //TODO LIST: 14 | Promises (可以让多个异步请求更加的有条理) 15 | 16 | Building custom directives(自定义指令) 17 | 18 | $resource service($resource 服务,非常好用的一个服务,底层是调用了$http Service) 19 | 20 | Unit testing(单元测试,这个尤为重要,甚至可以单拿出来讲很多,推荐jasmine) 21 | 22 | End-to-end testing(同上) 23 | 24 | Midway testing(介于前面两者的测试) 25 | 26 | i18n and I10n language translation/localization(多语言) 27 | 28 | Authentication and customizing XHR requests(验证和自定义XHR请求) 29 | 30 | Using the $provide service to build customizable services(使用$provider服务来创建自定义服务) 31 | 32 | Forms and validations(表单和验证) 33 | 34 | IE compatibility(IE兼容性) 35 | 36 | 37 | 最后-实战-实战-还是实战 38 | 39 | 具体都有啥,看看列表截图: 40 | ![](https://github.com/tzq668766/screenshots/blob/master/angularjs_train_screenshots/angularjs_learn1.jpg) 41 | 42 | ![](https://github.com/tzq668766/screenshots/blob/master/angularjs_train_screenshots/angularjs_learn2.jpg) 43 | 44 | ### Angular1 学习了,再来学学Angular2吧, 下面是我 Angular2学习项目, 正在进行中... 45 | [学习Angular2](https://github.com/tzq668766/angular2_train) 46 | -------------------------------------------------------------------------------- /angularjs_uirouter_steps_demo/form.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 | 6 | 17 | 18 | 19 |
20 | 21 |
22 |
23 | 24 |
25 | 26 | 27 |
28 |     {{ formData }}
29 |   
30 | 31 |
32 |
-------------------------------------------------------------------------------- /angularjs_login/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 35 | 36 | -------------------------------------------------------------------------------- /angularjs-douban-movie/src/sass/mixins/_common.scss: -------------------------------------------------------------------------------- 1 | // 2 | 3 | @mixin vertical-align($parent-height, $element-height) { 4 | margin-top: (($parent-height - $element-height) / 2); 5 | //margin-top: (($parent-height - $element-height) / 2); 6 | } 7 | 8 | @mixin rounded($radius: 2px) { 9 | border-radius: $radius; 10 | } 11 | 12 | @mixin opacity($opacity: 0.5) { 13 | opacity: $opacity; 14 | } 15 | 16 | @mixin clearfix() { 17 | &:before, 18 | &:after { 19 | content: " "; // 1 20 | display: table; // 2 21 | } 22 | &:after { 23 | clear: both; 24 | } 25 | } 26 | 27 | @mixin transform($arguments...) { 28 | -webkit-transform: $arguments; 29 | -moz-transform: $arguments; 30 | -o-transform: $arguments; 31 | -ms-transform: $arguments; 32 | transform: $arguments; 33 | } 34 | 35 | @mixin rotate($deg:5deg) { 36 | @include transform(rotate($deg)); 37 | } 38 | 39 | @mixin translate($x:0, $y:0) { 40 | @include transform(translate($x, $y)); 41 | } 42 | 43 | @mixin translate3d($x:0, $y:0, $z:0) { 44 | @include transform(translate3d($x, $y, $z)); 45 | } 46 | 47 | @mixin scale($x:0, $y:0) { 48 | @include transform(scale($x, $y)); 49 | } 50 | 51 | @mixin scale3d($x:0, $y:0, $z:0) { 52 | @include transform(scale3d($x, $y, $z)); 53 | } 54 | 55 | @mixin transition($value...) { 56 | -webkit-transition: $value; 57 | transition: $value; 58 | } -------------------------------------------------------------------------------- /angularjs_ngtemplate/views/template.html: -------------------------------------------------------------------------------- 1 |

angular指令创建的预输入插件

2 |
3 | 4 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /angularjs_route2/scripts/app.js: -------------------------------------------------------------------------------- 1 | var routeApp = angular.module('routeApp',['ngRoute']); 2 | routeApp.config(['$routeProvider',function ($routeProvider) { 3 | $routeProvider 4 | .when('/Book/:bookId', { 5 | templateUrl: 'views/book.html', 6 | controller: 'BookController', 7 | resolve: { 8 | //I will cause a 1 second delay 9 | delay: function($q, $timeout) { 10 | var delay = $q.defer(); 11 | $timeout(delay.resolve, 1000); 12 | return delay.promise; 13 | } 14 | } 15 | }) 16 | .when('/Book/:bookId/ch/:chapterId', { 17 | templateUrl: 'views/chapter.html', 18 | controller: 'ChapterController' 19 | }); 20 | }]); 21 | 22 | routeApp.controller('MainController', function($scope, $route, $routeParams, $location) { 23 | $scope.$route = $route; 24 | $scope.$location = $location; 25 | $scope.$routeParams = $routeParams; 26 | }); 27 | 28 | routeApp.controller('BookController', function($scope, $routeParams) { 29 | $scope.name = "BookController"; 30 | $scope.params = $routeParams; 31 | }); 32 | 33 | routeApp.controller('ChapterController', function($scope, $routeParams) { 34 | $scope.name = "ChapterController"; 35 | $scope.params = $routeParams; 36 | }); 37 | -------------------------------------------------------------------------------- /angularjs_directive/angularjs_scope.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
指令属性scope属性值传递示例
11 | 12 | 13 |
16 |
17 | 18 | 19 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /todos/public/app.js: -------------------------------------------------------------------------------- 1 | var app=angular.module('todoModule', []); 2 | 3 | //创建控制器 4 | app.controller('MainCtrl',function($scope,$http){ 5 | $scope.formData={}; 6 | $scope.doneList=[]; 7 | 8 | //列表TODO 9 | $http.get('/api/todos') 10 | .success(function(data){ 11 | $scope.todos=data; 12 | console.log(data); 13 | }) 14 | .error(function(data){ 15 | console.log('Error:'+data); 16 | }); 17 | 18 | //添加TODO 19 | $scope.createTodo=function(){ 20 | console.log($scope.formData); 21 | $http.post('/api/todos',$scope.formData) 22 | .success(function(data){ 23 | $scope.formData={}; 24 | $scope.todos=data; 25 | console.log(data); 26 | }) 27 | .error(function(data){ 28 | console.log('Error:'+data); 29 | }); 30 | } 31 | 32 | //更新TODO 33 | $scope.todoDone=function(id){ 34 | $http.put('/api/todos/'+id) 35 | .success(function(data){ 36 | $scope.todos=data; 37 | console.log(data); 38 | }) 39 | .error(function(data){ 40 | console.log('Error:'+data); 41 | }); 42 | } 43 | 44 | //删除TODO 45 | $scope.removeFinishedTodos=function(){ 46 | $http.delete('/api/todos/') 47 | .success(function(data){ 48 | $scope.todos=data; 49 | console.log(data); 50 | }) 51 | .error(function(data){ 52 | console.log('Error:'+data); 53 | }); 54 | } 55 | }); 56 | 57 | 58 | -------------------------------------------------------------------------------- /angularjs-douban-movie/src/js/services/MovieService.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chenzhen on 15/12/14. 3 | */ 4 | 5 | angular.module('indigo').service('MovieService', function($q, Jsonp){ 6 | 7 | this.urlArr = { 8 | 'in_theaters' : 'https://api.douban.com/v2/movie/in_theaters', 9 | 'coming_soon' : 'https://api.douban.com/v2/movie/coming_soon', 10 | 'top250' : 'https://api.douban.com/v2/movie/top250', 11 | 'weekly' : 'https://api.douban.com/v2/movie/weekly', 12 | 'us_box' : 'https://api.douban.com/v2/movie/us_box', 13 | 'new_movies' : 'https://api.douban.com/v2/movie/new_movies', 14 | } 15 | 16 | 17 | this.getMovies = function(type){ 18 | var url = this.urlArr[type]; 19 | var deferred = $q.defer(); 20 | Jsonp.get(url,function(data){ 21 | if(data){ 22 | deferred.resolve(data); 23 | }else{ 24 | deferred.reject(data); 25 | } 26 | }); 27 | return deferred.promise; 28 | } 29 | 30 | this.getDetail = function(id){ 31 | var url = 'https://api.douban.com/v2/movie/subject/' + id; 32 | var deferred = $q.defer(); 33 | Jsonp.get(url,function(data){ 34 | if(data){ 35 | deferred.resolve(data); 36 | }else{ 37 | deferred.reject(data); 38 | } 39 | }); 40 | return deferred.promise; 41 | } 42 | }) -------------------------------------------------------------------------------- /angularjs_controller/angularjs_controller_timer2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS· Controller 6 | 7 | 13 | 14 | 15 |
16 |
17 | 28 |
29 |
30 |

Demo1-Controller-计时器-脚本与页面分离

31 |
32 |

输出:{{clock}}

33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /minovate_page/index.html: -------------------------------------------------------------------------------- 1 | 2 | Minovate - Admin Dashboard
-------------------------------------------------------------------------------- /angularjs_crud/assets/tpl/edit.html: -------------------------------------------------------------------------------- 1 |

Edit user

2 |
3 |
4 |
5 | 6 |
7 | 8 | 9 |
10 |
11 | 12 | 13 |
14 |
15 | 16 | 17 |
18 |
19 | 20 | 21 |
22 | 23 | 24 | Cancel 25 |
26 |
27 |
-------------------------------------------------------------------------------- /angularjs_proxy/angularjs_proxy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 13 | 14 | 15 | 16 |
17 |
18 | 29 |
30 |
31 |

Angular中实现控制器与指令之间的通信

32 |
还未实现
33 |
34 |
35 | 36 | 37 | 38 | 39 | 46 | -------------------------------------------------------------------------------- /app_i18n/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS Localization Resource Service 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

{{ '_FirstNameHelp_' | i18n }}

19 |

{{'_HomeTitle_' | i18n }}

20 |
21 |
22 |
23 | English 24 | | PigLatin 25 | | 中文 26 | | controller中获取值 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /static/js/angular-1.3.15/angular-loader.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | AngularJS v1.3.15 3 | (c) 2010-2014 Google, Inc. http://angularjs.org 4 | License: MIT 5 | */ 6 | (function(){'use strict';function d(b){return function(){var c=arguments[0],e;e="["+(b?b+":":"")+c+"] http://errors.angularjs.org/1.3.15/"+(b?b+"/":"")+c;for(c=1;c 2 | 3 | 4 | ng-select 5 | 6 | 7 | 8 | 9 |
10 |
11 |
12 | 17 |
18 |

当前值:{{myOption}}

19 |
20 |
21 | 22 | 23 | 24 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /app_i18n/scripts/AppController.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains WebStorm. 3 | * User: jim.lavin 4 | * Date: 12/8/12 5 | * Time: 12:19 PM 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | 9 | 'use strict'; 10 | 11 | angular.module('localizeApp', ['localization','ui.bootstrap','ngResource','ngRoute']).controller("AppController",function($scope, localize){ 12 | $scope.People = [{FirstName:"Jim", LastName:"Lavin", Email:"jlavin@jimlavin.net", Bio:"Creator and Host of Coding Smackdown TV"}]; 13 | 14 | $scope.setEnglishLanguage = function() { 15 | localize.setLanguage('en-US'); 16 | }; 17 | 18 | $scope.setPigLatinLanguage = function() { 19 | localize.setLanguage('es-es'); 20 | }; 21 | $scope.setChineseLanguage = function() { 22 | localize.setLanguage('zh-CN'); 23 | }; 24 | $scope.getValue = function(){ 25 | console.log(localize.getLocalizedString('_HomeControllerTitle_')); 26 | } 27 | }); 28 | 29 | //function AppController($scope, localize) { 30 | // $scope.People = [{FirstName:"Jim", LastName:"Lavin", Email:"jlavin@jimlavin.net", Bio:"Creator and Host of Coding Smackdown TV"}]; 31 | // 32 | // $scope.setEnglishLanguage = function() { 33 | // localize.setLanguage('en-US'); 34 | // }; 35 | // 36 | // $scope.setPigLatinLanguage = function() { 37 | // localize.setLanguage('es-es'); 38 | // }; 39 | // $scope.setChineseLanguage = function() { 40 | // localize.setLanguage('zh-CN'); 41 | // }; 42 | // $scope.getValue = function(){ 43 | // console.log(localize.getLocalizedString('_HomeControllerTitle_')); 44 | // } 45 | //} 46 | 47 | -------------------------------------------------------------------------------- /angularjs_route/angularjs_route.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 18 | 19 | 20 | 21 |
22 |
23 | 34 |
35 |
36 |
37 |

Demo1: AngularJS路由和模板

38 |
39 |
40 |
41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /angularjs-tutorial/main.ctrl.js: -------------------------------------------------------------------------------- 1 | angular.module('app').controller("MainController", function(){ 2 | var vm = this; 3 | vm.title = 'AngularJS Tutorial Example'; 4 | vm.searchInput = ''; 5 | vm.shows = [ 6 | { 7 | title: 'Game of Thrones', 8 | year: 2011, 9 | favorite: true 10 | }, 11 | { 12 | title: 'Walking Dead', 13 | year: 2010, 14 | favorite: false 15 | }, 16 | { 17 | title: 'Firefly', 18 | year: 2002, 19 | favorite: true 20 | }, 21 | { 22 | title: 'Banshee', 23 | year: 2013, 24 | favorite: true 25 | }, 26 | { 27 | title: 'Greys Anatomy', 28 | year: 2005, 29 | favorite: false 30 | } 31 | ]; 32 | vm.orders = [ 33 | { 34 | id: 1, 35 | title: 'Year Ascending', 36 | key: 'year', 37 | reverse: false 38 | }, 39 | { 40 | id: 2, 41 | title: 'Year Descending', 42 | key: 'year', 43 | reverse: true 44 | }, 45 | { 46 | id: 3, 47 | title: 'Title Ascending', 48 | key: 'title', 49 | reverse: false 50 | }, 51 | { 52 | id: 4, 53 | title: 'Title Descending', 54 | key: 'title', 55 | reverse: true 56 | } 57 | ]; 58 | vm.order = vm.orders[0]; 59 | vm.new = {}; 60 | vm.addShow = function() { 61 | vm.shows.push(vm.new); 62 | vm.new = {}; 63 | }; 64 | }); 65 | -------------------------------------------------------------------------------- /angularjs-douban-movie/gulpfile.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by chenzhen on 15/12/14. 3 | */ 4 | var gulp = require('gulp'); 5 | var concat = require('gulp-concat'); 6 | var uglify = require('gulp-uglify'); 7 | var ngAnnotate = require('gulp-ng-annotate'); 8 | var sass = require('gulp-ruby-sass'); 9 | var minifyCss = require('gulp-minify-css'); 10 | // 11 | gulp.task('js', function(){ 12 | gulp.src(['src/js/*.js', 'src/js/**/*.js', '!src/js/vendor/*.js']) 13 | .pipe(concat('app.js')) 14 | .pipe(ngAnnotate()) 15 | //.pipe(uglify()) 16 | .pipe(gulp.dest('assets/js')) 17 | }); 18 | 19 | // 20 | gulp.task('vendor-js', function(){ 21 | gulp.src([ 22 | 'src/js/vendor/angular.min.js', 23 | 'src/js/vendor/angular-animate.min.js', 24 | 'src/js/vendor/angular-ui-router.min.js', 25 | 'src/js/vendor/off-canvas.js', 26 | ]) 27 | .pipe(concat('vendor.js')) 28 | //.pipe(ngAnnotate()) 29 | //.pipe(uglify()) 30 | .pipe(gulp.dest('assets/js')) 31 | }); 32 | 33 | gulp.task('sass', function(){ 34 | //gulp.src(['src/sass/app.scss']) 35 | // .pipe(sass()) 36 | // .pipe(gulp.dest('assets/css')); 37 | return sass('src/sass/app.scss') 38 | .on('error', sass.logError) 39 | //.pipe(minifyCss()) 40 | .pipe(gulp.dest('assets/css')); 41 | }) 42 | 43 | gulp.task('watch', function(){ 44 | gulp.watch('src/js/*.js', ['js']); 45 | gulp.watch('src/js/**/*.js', ['js']); 46 | gulp.watch('src/sass/*.scss', ['sass']); 47 | gulp.watch('src/sass/**/*.scss', ['sass']); 48 | }) 49 | 50 | // define the default task 51 | gulp.task('default', ['watch', 'vendor-js', 'sass']); -------------------------------------------------------------------------------- /angularjs_route2/angularjs_route.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 |
14 |

Demo1: AngularJS路由和模板示例2

15 |
16 | 菜单: 17 | Moby | 18 | Moby: Ch1 | 19 | Gatsby | 20 | Gatsby: Ch4 | 21 | Scarlet Letter
22 | 23 |
24 | 25 |
26 |

当前路径,模版,参数等:

27 |
$location.path() = {{$location.path()}}
28 |
$route.current.templateUrl = {{$route.current.templateUrl}}
29 |
$route.current.params = {{$route.current.params}}
30 |
$route.current.scope.name = {{$route.current.scope.name}}
31 |
$routeParams = {{$routeParams}}
32 |
33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /angularjs_route_http/scripts/app.js: -------------------------------------------------------------------------------- 1 | var routeApp = angular.module('movieApp',['ngRoute']); 2 | 3 | routeApp.run(function($rootScope) { 4 | $rootScope.appname = "欢迎使用AngularJS"; 5 | }); 6 | routeApp.config(['$routeProvider', '$httpProvider', function ($routeProvider, $httpProvider) { 7 | $routeProvider.when('/movieList',{ 8 | templateUrl:'views/route/movie_list.html', 9 | controller:'MovieListController' 10 | }).when('/movieDetail/:id',{ 11 | templateUrl:'views/route/movie_detail.html', 12 | controller:'MovieDetailController' 13 | }).otherwise({ 14 | redirectTo: '/movieList' 15 | }); 16 | 17 | //HTTP拦截器,文档地址:http://docs.angularjs.cn/api/ng/service/$http#interceptors 18 | $httpProvider.interceptors.push(['$q', '$location', function($q, $location) { 19 | return { 20 | 'request': function (config) { 21 | config.headers = config.headers || {}; 22 | //if ($localStorage.token) { 23 | // config.headers.Authorization = 'Bearer ' + $localStorage.token; 24 | //} 25 | //TODO 向请求头中加入信息,如token 26 | config.headers.CustomizeHeader = 'helloworld'; 27 | console.log("拦截request"); 28 | return config; 29 | }, 30 | 'responseError': function(response) { 31 | //TODO 错误处理,如:如果服务器端返回401,403等错误,跳转到登录页,如下: 32 | if(response.status === 401 || response.status === 403) { 33 | $location.path('/signin'); 34 | } 35 | console.log("拦截response"); 36 | return $q.reject(response); 37 | } 38 | }; 39 | }]); 40 | 41 | }]); 42 | -------------------------------------------------------------------------------- /angularjs_app_site/app/views/signin.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 |
6 | 10 |
11 |
12 | 13 |
14 | 15 |
16 |
17 |
18 | 19 |
20 | 21 |
22 |
23 |
24 |
25 | 26 |
27 |
28 |
29 |
30 |
31 |
32 |
-------------------------------------------------------------------------------- /angularjs_app_site/app/js/app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('MyAPP', [ 'ngStorage', 'ngRoute', 'angular-loading-bar']) 4 | .config(['$routeProvider', '$httpProvider', function ($routeProvider, $httpProvider) { 5 | 6 | /** 7 | * 路由配置 8 | */ 9 | $routeProvider. 10 | when('/', { 11 | templateUrl: 'views/home.html', 12 | controller: 'HomeCtrl' 13 | }). 14 | when('/signin', { 15 | templateUrl: 'views/signin.html', 16 | controller: 'HomeCtrl' 17 | }). 18 | when('/signup', { 19 | templateUrl: 'views/signup.html', 20 | controller: 'HomeCtrl' 21 | }). 22 | when('/profile', { 23 | templateUrl: 'views/profile.html', 24 | controller: 'HomeCtrl' 25 | }). 26 | otherwise({ 27 | redirectTo: '/' 28 | }); 29 | 30 | /** 31 | * 拦截器配置 32 | */ 33 | $httpProvider.interceptors.push(['$q', '$location', '$localStorage', function($q, $location, $localStorage) { 34 | return { 35 | 'request': function (config) { 36 | config.headers = config.headers || {}; 37 | if ($localStorage.token) { 38 | config.headers.Authorization = 'Bearer ' + $localStorage.token; 39 | } 40 | return config; 41 | }, 42 | 'responseError': function(response) { 43 | if(response.status === 401 || response.status === 403) { 44 | $location.path('/signin'); 45 | } 46 | return $q.reject(response); 47 | } 48 | }; 49 | }]); 50 | 51 | } 52 | ]); -------------------------------------------------------------------------------- /angularjs-douban-movie/ngviews/home/detail.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |

{{movie.title}}

6 |

8.2{{movie.ratings_count}}人评分

7 |

8 | 导演:{{director.name}} / 9 |

10 |

11 | 主演: {{cast.name}} / 12 |

13 |

14 | 类型: {{genre}} / 15 |

16 |

17 | 语言: 英语 18 |

19 |

20 | 剧情: 21 |

22 |

{{movie.summary}}

23 |
24 |
25 |

26 | 影人: 27 |

28 |
    29 |
  • 30 | 31 |

    {{cast.name}}

    32 |
  • 33 |
34 |
35 |
36 |
-------------------------------------------------------------------------------- /angularjs_filter/angularjs_customize_filter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 12 | 13 | 14 |
15 |
16 | 27 |
28 |

AngularJS自定义Filter,参考:http://blog.jobbole.com/45511/

29 |
30 |
    31 |
  • 32 | {{name | capitalize}} 33 |
  • 34 |
35 |
36 |
37 | 38 | 39 | 40 | 49 | -------------------------------------------------------------------------------- /static/js/angular-1.3.15/angular-messages.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | AngularJS v1.3.15 3 | (c) 2010-2014 Google, Inc. http://angularjs.org 4 | License: MIT 5 | */ 6 | (function(r,f,s){'use strict';f.module("ngMessages",[]).directive("ngMessages",["$compile","$animate","$templateRequest",function(q,k,l){return{restrict:"AE",controller:function(){this.$renderNgMessageClasses=f.noop;var b=[];this.registerMessage=function(d,a){for(var c=0;c").html(a);f.forEach(a.children(), 8 | function(a){a=f.element(a);h?h.after(a):d.prepend(a);h=a;q(a)(b)});c.renderMessages(e,g)})}}}]).directive("ngMessage",["$animate",function(f){return{require:"^ngMessages",transclude:"element",terminal:!0,restrict:"AE",link:function(k,l,b,d,a){for(var c,g,e=l[0],n=e.parentNode,h=0,p=0;h 2 | 3 |
4 |
5 |
6 | 10 | 11 |
12 |
13 | 14 |
15 | 16 |
17 |
18 |
19 | 20 |
21 | 22 |
23 |
24 |
25 |
26 | 27 |
28 |
29 |
30 |
31 |
32 |
33 | -------------------------------------------------------------------------------- /angularjs_route_http/angularjs_route_http.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 18 | 19 | 20 |
21 | 22 |
23 | 34 |
35 | 36 | 37 | 38 | 39 |
40 |
41 |
42 |
43 |
44 | 45 |
46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /angularjs_controller/angularjs_controller_timer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS· Controller 6 | 7 | 13 | 14 | 15 |
16 |
17 | 28 |
29 |
30 |

Demo1-Controller-计时器

31 |
32 |

输出:{{clock}}

33 |
34 |
35 |
36 | 37 | 38 | 39 | 52 | -------------------------------------------------------------------------------- /angularjs-douban-movie/src/sass/vendor/_off-canvas.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * angular-off-canvas v0.1.0 3 | * (c) 2013 Ciro Nunes http://cironunes.github.io/ 4 | * License: MIT 5 | */ 6 | 7 | // Variables 8 | // ---------- 9 | $off-canvas-transition: all .3s cubic-bezier(.16,.63,.45,.98); 10 | $off-canvas-size: 50%; 11 | 12 | // Mixins 13 | // ---------- 14 | // http://www.stefanwienert.net/blog/2012/05/18/easy-css-vendor-prefix-mixin-for-sass/ 15 | //@mixin vendor-prefix($name, $argument){ 16 | // -webkit-$name: $argument; 17 | // -ms-$name: $argument; 18 | // -moz-$name: $argument; 19 | // -o-$name: $argument; 20 | // $name: $argument; 21 | //} 22 | 23 | 24 | /* prevent horizontal scroll */ 25 | html, body{ 26 | overflow-x: hidden 27 | } 28 | 29 | .off-canvas__nav{ 30 | position: fixed; 31 | right: 0; 32 | top: 0; 33 | z-index: 999; 34 | height: 100%; 35 | width: $off-canvas-size; 36 | overflow-y: auto; 37 | overflow-x: hidden; 38 | background-color: #fff; 39 | @include transform(translate3d(0,0,0) translateX(100%)); 40 | @include transition($off-canvas-transition); 41 | } 42 | 43 | 44 | .off-canvas__content{ 45 | @include transform(translate3d(0,0,0) translateX(0)); 46 | @include transition($off-canvas-transition); 47 | } 48 | 49 | 50 | .is-off-canvas-opened .off-canvas__nav{ 51 | @include transform( translate3d(0,0,0) translateX(0)); 52 | @include transition(translate3d(0,0,0) translateX(0)) 53 | } 54 | 55 | .is-off-canvas-opened .off-canvas__content{ 56 | @include transform(translate3d(0, 0, 0) translate(-$off-canvas-size)) 57 | } 58 | 59 | .is-off-canvas-opened .off-canvas-mask{ 60 | position: fixed; 61 | top: 0; 62 | left: 0; 63 | right: 0; 64 | bottom: 0; 65 | background: #000; 66 | opacity: .5; 67 | z-index: 99; 68 | overflow: hidden; 69 | @include transition(all .3s ease); 70 | } -------------------------------------------------------------------------------- /angularjs_module/angularjs_module.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS· Controller 6 | 7 | 13 | 14 | 15 |
16 |
17 | 28 |
29 |
30 |

Demo1-Module

31 |
32 |
33 |

输出:{{user.name}} say, welcome to visit {{user.website}}

34 |
35 |
36 |
37 |
38 | 39 | 40 | 41 | 49 | -------------------------------------------------------------------------------- /angularjs_location/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21.1 $location 5 | 6 | 7 | 8 | 9 |
10 |
11 | 12 |

完整url路径: {{absurl}}

13 |

url路径(当前url#后面的内容,包括参数和哈希值): {{url}} 14 | 15 |

16 |

相对路径(也就是当前url#后面的内容,不包括参数): {{path}} 17 | 18 |

19 |

协议(比如http,https): {{protocol}}

20 |

主机名: {{host}}

21 |

端口号: {{port}}

22 |

哈希值: {{hash}} 23 | 24 |

25 |

search值序列化json: 26 | {{search}} 27 | 28 | 29 | 30 | 31 | 32 | 33 |

34 | /some1?foo=bar | 35 | /some2?foo=bar#myhash | 36 | 外部链接 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /angular_audio_player/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |

NPR player

14 |
15 | 16 |
17 |
18 |

Player

19 |
20 | 21 |
22 |
23 |
24 | 25 |
    26 |
  • 27 | 28 |
  • 29 |
30 |
31 |
32 | 33 |
34 |

Related content

35 | 38 |
39 |
40 | 41 | 46 | 47 | 48 | 51 | 52 | -------------------------------------------------------------------------------- /angularjs-douban-movie/src/sass/modules/_grid.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | @include container-fixed; 12 | 13 | @media (min-width: $screen-sm-min) { 14 | width: $container-sm; 15 | } 16 | @media (min-width: $screen-md-min) { 17 | width: $container-md; 18 | } 19 | @media (min-width: $screen-lg-min) { 20 | width: $container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | @include container-fixed; 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | @include make-row; 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | @include make-grid-columns; 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | @include make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: $screen-sm-min) { 65 | @include make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: $screen-md-min) { 74 | @include make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: $screen-lg-min) { 83 | @include make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /angularjs-douban-movie/server.js: -------------------------------------------------------------------------------- 1 | //TODO 添加服务器端程序使得项目可以通过node启动并访问 2 | // var http = require("http"); 3 | // var url = require("url"); 4 | // var fs = require('fs'); 5 | // 6 | // var server=http.createServer(function(request,response){ 7 | // var pathname = url.parse(request.url).pathname; 8 | // 9 | // if(pathname=="/"){ 10 | // 11 | // fs.readFile('./index.html', function(err, content){ 12 | // if(err) { 13 | // response.writeHead(404, { 'Content-Type':'text/plain; charset="UTF-8"' }); 14 | // response.write(err.message); 15 | // response.end(); 16 | // } else { 17 | // response.writeHead(200, { 'Content-Type' : 'text/html; charset=UTF-8' }); 18 | // response.write(content); 19 | // response.end(); 20 | // } 21 | // }); 22 | // //response.writeHead(200,{"Content-Type":"text/plain"}); 23 | // //response.write("hello nodejs,I am index"); 24 | // //response.end(); 25 | // }else{ 26 | // response.writeHead(200,{"Content-Type":"text/plain"}); 27 | // response.write("404 Not found."); 28 | // response.end(); 29 | // } 30 | // }); 31 | // server.listen(8888); 32 | // 33 | // console.log("server started on port 8888"); 34 | var express = require('express'), 35 | ejs = require('ejs'), 36 | path = require('path'); 37 | 38 | var app = express(); 39 | 40 | app.engine('.html', ejs.__express); 41 | app.set('view engine', 'html'); 42 | app.use(express.static('assets')); 43 | app.set('views', __dirname); 44 | 45 | //app.use(express.static(path.join(__dirname, 'assets'))); 46 | 47 | 48 | app.get('/', function(req, res){ 49 | //res.send('hello world'); 50 | console.log(app.get('views')); 51 | res.render('index',{}); 52 | }); 53 | 54 | app.listen(3000); 55 | console.log("server started on port 3000"); 56 | -------------------------------------------------------------------------------- /angularjs_controller/angularjs_controller_timer3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS· Controller 6 | 7 | 13 | 14 | 15 |
16 |
17 | 28 |
29 |
30 |

Demo1-Controller-计时器

31 |
32 |

输出:{{clock.now}}

33 |
34 |
35 |
36 | 37 | 38 | 39 | 58 | -------------------------------------------------------------------------------- /angularjs_nginclude/angularjs_nginclude.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 18 | 19 | 20 |
21 |
22 | 33 |
34 |

ng-include示例

35 |
36 |
37 |
38 | 我是内容区域 39 |
40 |
41 |
42 |
43 | 44 | 45 | 46 | 47 | 50 | -------------------------------------------------------------------------------- /angularjs_nginclude/angularjs_nginclude2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 18 | 19 | 20 |
21 |
22 | 33 |
34 |

ng-include示例

35 |
36 |
37 |
38 | 我是内容区域 39 |
40 |
41 |
42 |
43 | 44 | 45 | 46 | 47 | 50 | -------------------------------------------------------------------------------- /angularjs-douban-movie/src/js/vendor/off-canvas.js: -------------------------------------------------------------------------------- 1 | /* 2 | * angular-off-canvas v0.1.0 3 | * (c) 2013 Ciro Nunes http://cironunes.github.io/ 4 | * License: MIT 5 | */ 6 | 7 | 'use strict'; 8 | 9 | angular.module('cn.offCanvas', []) 10 | .factory('cnOffCanvas', function($compile, $rootScope, $controller, $http, $templateCache, $q) { 11 | return function (config) { 12 | console.log(config); 13 | var container = angular.element(config.container || document.body), 14 | containerClass = config.containerClass || 'is-off-canvas-opened', 15 | controller = config.controller || angular.noop, 16 | controllerAs = config.controllerAs, 17 | element = null, 18 | html, deferred, scope, ctrl; 19 | 20 | if ((+!!config.template) + (+!!config.templateUrl) !== 1) { 21 | throw new Error('You must specify either a `template` or a `templateUrl` to create an off-canvas navigation.'); 22 | } 23 | 24 | if (config.template) { 25 | deferred = $q.defer(); 26 | deferred.resolve(config.template); 27 | html = deferred.promise; 28 | } else { 29 | html = $http.get(config.templateUrl, { 30 | cache: $templateCache 31 | }).then(function(response) { 32 | return response.data; 33 | }); 34 | } 35 | 36 | html.then(function(html) { 37 | scope = $rootScope.$new(); 38 | ctrl = $controller(controller, {$scope: scope}); 39 | console.log(ctrl) 40 | if (controllerAs) { 41 | scope[controllerAs] = ctrl; 42 | } 43 | element = angular.element(html); 44 | container.prepend(element); 45 | //var ctrlAs = "main"; 46 | //var mask = "
"; 47 | //container.prepend(angular.element(mask)); 48 | $compile(element)(scope); 49 | }) 50 | 51 | function toggle() { 52 | this.isOpened = !this.isOpened; 53 | container.toggleClass(containerClass); 54 | } 55 | 56 | return { 57 | toggle: toggle, 58 | isOpened: false 59 | } 60 | } 61 | }); 62 | -------------------------------------------------------------------------------- /app_i18n/i18n/resources-locale_es.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key":"_Greeting_", 4 | "value":"iteSa ocalizationla xampleea singua heta esourcera ocalizationla ervicesa", 5 | "description":"Home page greeting text" 6 | }, 7 | { 8 | "key":"_HomeTitle_", 9 | "value":"esourceRa ocalizationLa erviceSa", 10 | "description":"Home page title text" 11 | }, 12 | { 13 | "key":"_HomeControllerTitle_", 14 | "value":"istLa xampleEa", 15 | "description":"Home Pane Title" 16 | }, 17 | { 18 | "key":"_FormControllerTitle_", 19 | "value":"ormFa xampleEa", 20 | "description":"Add/Edit Person Form Title" 21 | }, 22 | { 23 | "key":"_FirstNameLabel_", 24 | "value":"irstFa ameNa", 25 | "description":"Label for first name field" 26 | }, 27 | { 28 | "key":"_LastNameLabel_", 29 | "value":"astLa ameNa", 30 | "description":"Label for last name field" 31 | }, 32 | { 33 | "key":"_EMailLabel_", 34 | "value":"mailEa", 35 | "description":"Label for email field" 36 | }, 37 | { 38 | "key":"_BioLabel_", 39 | "value":"ioBa (ellta sua omethingsa boutaa ouya) ", 40 | "description":"Label for biography field" 41 | }, 42 | { 43 | "key":"_SaveButtonLabel_", 44 | "value":"aveSa", 45 | "description":"Label for Save button" 46 | }, 47 | { 48 | "key":"_CancelButtonLabel_", 49 | "value":"ancelCa", 50 | "description":"Label for Cancel button" 51 | }, 52 | { 53 | "key":"_NameHeader_", 54 | "value":"ameNa", 55 | "description":"Person List Name Header" 56 | }, 57 | { 58 | "key":"_EmailHeader_", 59 | "value":"mailEa", 60 | "description":"Person List Name Header" 61 | }, 62 | { 63 | "key":"_BioHeader_", 64 | "value":"iographyBa", 65 | "description":"Person List Bio Header" 66 | } 67 | ] 68 | -------------------------------------------------------------------------------- /angularjs_ioc/angularjs_ioc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 12 | 13 | 14 | 15 |
16 |
17 | 28 |
29 |
30 |

AngularJS IOC依赖注入示例

31 |
32 | 33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | 63 | -------------------------------------------------------------------------------- /angularjs_service/angularjs_service.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 12 | 13 | 14 |
15 |
16 | 27 |
28 |

AngularJS service数据共享示例

29 |
30 |
31 | MainCtrl: 32 |
33 |
34 | SecondCtrl: 35 |
36 |
37 |
38 | 39 | 40 | 41 | 58 | -------------------------------------------------------------------------------- /angularjs_app_site/app/js/services.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*Service业务逻辑封装*/ 4 | angular.module('MyAPP') 5 | .factory('Main', ['$http', '$localStorage', function($http, $localStorage){ 6 | var baseUrl = "http://localhost:3000"; 7 | function changeUser(user) { 8 | angular.extend(currentUser, user); 9 | } 10 | 11 | function urlBase64Decode(str) { 12 | var output = str.replace('-', '+').replace('_', '/'); 13 | switch (output.length % 4) { 14 | case 0: 15 | break; 16 | case 2: 17 | output += '=='; 18 | break; 19 | case 3: 20 | output += '='; 21 | break; 22 | default: 23 | throw 'Illegal base64url string!'; 24 | } 25 | return window.atob(output); 26 | } 27 | 28 | function getUserFromToken() { 29 | var token = $localStorage.token; 30 | var user = {}; 31 | if (typeof token !== 'undefined') { 32 | var encoded = token.split('.')[1]; 33 | user = JSON.parse(urlBase64Decode(encoded)); 34 | } 35 | return user; 36 | } 37 | 38 | var currentUser = getUserFromToken(); 39 | 40 | return { 41 | save: function(data, success, error) { 42 | $http.post(baseUrl + '/api-signin', data).success(success).error(error) 43 | }, 44 | signin: function(data, success, error) { 45 | $http.post(baseUrl + '/api-authenticate', data).success(success).error(error) 46 | }, 47 | me: function(success, error) { 48 | $http.get(baseUrl + '/api-profile').success(success).error(error) 49 | }, 50 | logout: function(success) { 51 | changeUser({}); 52 | delete $localStorage.token; 53 | success(); 54 | } 55 | }; 56 | } 57 | ]); -------------------------------------------------------------------------------- /angularjs_ngclass/angularjs_ngclass.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 27 | 28 | 29 | 30 |
31 |
32 |
33 |

Demo1: ng-class示例

34 | 35 |
36 |
    37 |
  • 38 | {{person.name}}-{{person.age}} 39 |
  • 40 |
41 |
42 |
43 |
    44 |
  • 45 | {{person.name}}-{{person.age}} 46 |
  • 47 |
48 |
49 |
50 |
51 | 52 | 53 | 54 | 66 | -------------------------------------------------------------------------------- /angularjs_route_http/data/movies.json: -------------------------------------------------------------------------------- 1 | { 2 | "movies": [ 3 | { 4 | "title": "电影1", 5 | "desc": "AngularJS重新定义了前端应用的开发方式。面对HTML和JavaScript之间的界线,它非但不畏缩不前,反而正面出击,提出了有效的解决方案。很多前端应用的开发框架,比如Backbone、EmberJS等,都要求开发者继承此框架特有的一些JavaScript对象。这种方式有其长处,但它", 6 | "thumb":"https://img1.doubanio.com/view/movie_poster_cover/lpst/public/p2316177058.jpg" 7 | }, 8 | { 9 | "title": "Hello电影1 ,title2", 10 | "desc": "AngularJS重新定义了前端应用的开发方式。面对HTML和JavaScript之间的界线,它非但不畏缩不前,反而正面出击,提出了有效的解决方案。很多前端应用的开发框架,比如Backbone、EmberJS等,都要求开发者继承此框架特有的一些JavaScript对象。这种方式有其长处,但它", 11 | "thumb":"https://img1.doubanio.com/view/movie_poster_cover/lpst/public/p2320939539.jpg" 12 | }, 13 | { 14 | "title": "卧虎藏龙:青冥宝剑", 15 | "desc": "直到现在,你或许已经听说过AngularJS了,一个改变你对web应用思考方式,由谷歌开发的令人兴奋的开源框架。关于它的文章已经写得非常之多,但我发现还是要写些给那些更喜欢快速且实际例子的开发者。当今对web编程已经发生了改变。下面通过对5个实例的解释,你可以找到Angular应用的基本构建块,包括模型,视图,控制器,服务和过滤器,你可以在自己的浏览器中直接编辑。", 16 | "thumb":"https://img3.doubanio.com/view/movie_poster_cover/lpst/public/p2315805100.jpg" 17 | }, 18 | { 19 | "title": "西游记之孙悟空三打白骨精", 20 | "desc": "直到现在,你或许已经听说过AngularJS了,一个改变你对web应用思考方式,由谷歌开发的令人兴奋的开源框架。关于它的文章已经写得非常之多,但我发现还是要写些给那些更喜欢快速且实际例子的开发者。当今对web编程已经发生了改变。下面通过对5个实例的解释,你可以找到Angular应用的基本构建块,包括模型,视图,控制器,服务和过滤器,你可以在自己的浏览器中直接编辑。", 21 | "thumb":"https://img1.doubanio.com/view/movie_poster_cover/lpst/public/p2302137839.jpg" 22 | }, 23 | { 24 | "title": "火影忍者剧场版:博人传", 25 | "desc": "直到现在,你或许已经听说过AngularJS了,一个改变你对web应用思考方式,由谷歌开发的令人兴奋的开源框架。关于它的文章已经写得非常之多,但我发现还是要写些给那些更喜欢快速且实际例子的开发者。当今对web编程已经发生了改变。下面通过对5个实例的解释,你可以找到Angular应用的基本构建块,包括模型,视图,控制器,服务和过滤器,你可以在自己的浏览器中直接编辑。", 26 | "thumb":"https://img3.doubanio.com/view/movie_poster_cover/lpst/public/p2306653420.jpg" 27 | }, 28 | { 29 | "title": "功夫熊猫3", 30 | "desc": "直到现在,你或许已经听说过AngularJS了,一个改变你对web应用思考方式,由谷歌开发的令人兴奋的开源框架。关于它的文章已经写得非常之多,但我发现还是要写些给那些更喜欢快速且实际例子的开发者。当今对web编程已经发生了改变。下面通过对5个实例的解释,你可以找到Angular应用的基本构建块,包括模型,视图,控制器,服务和过滤器,你可以在自己的浏览器中直接编辑。", 31 | "thumb":"https://img1.doubanio.com/view/movie_poster_cover/lpst/public/p2319273504.jpg" 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /angularjs_service_controller_directive/data/photos.json: -------------------------------------------------------------------------------- 1 | { 2 | "movies": [ 3 | { 4 | "title": "电影1", 5 | "desc": "AngularJS重新定义了前端应用的开发方式。面对HTML和JavaScript之间的界线,它非但不畏缩不前,反而正面出击,提出了有效的解决方案。很多前端应用的开发框架,比如Backbone、EmberJS等,都要求开发者继承此框架特有的一些JavaScript对象。这种方式有其长处,但它", 6 | "thumb":"https://img1.doubanio.com/view/movie_poster_cover/lpst/public/p2316177058.jpg" 7 | }, 8 | { 9 | "title": "Hello电影1 ,title2", 10 | "desc": "AngularJS重新定义了前端应用的开发方式。面对HTML和JavaScript之间的界线,它非但不畏缩不前,反而正面出击,提出了有效的解决方案。很多前端应用的开发框架,比如Backbone、EmberJS等,都要求开发者继承此框架特有的一些JavaScript对象。这种方式有其长处,但它", 11 | "thumb":"https://img1.doubanio.com/view/movie_poster_cover/lpst/public/p2320939539.jpg" 12 | }, 13 | { 14 | "title": "卧虎藏龙:青冥宝剑", 15 | "desc": "直到现在,你或许已经听说过AngularJS了,一个改变你对web应用思考方式,由谷歌开发的令人兴奋的开源框架。关于它的文章已经写得非常之多,但我发现还是要写些给那些更喜欢快速且实际例子的开发者。当今对web编程已经发生了改变。下面通过对5个实例的解释,你可以找到Angular应用的基本构建块,包括模型,视图,控制器,服务和过滤器,你可以在自己的浏览器中直接编辑。", 16 | "thumb":"https://img3.doubanio.com/view/movie_poster_cover/lpst/public/p2315805100.jpg" 17 | }, 18 | { 19 | "title": "西游记之孙悟空三打白骨精", 20 | "desc": "直到现在,你或许已经听说过AngularJS了,一个改变你对web应用思考方式,由谷歌开发的令人兴奋的开源框架。关于它的文章已经写得非常之多,但我发现还是要写些给那些更喜欢快速且实际例子的开发者。当今对web编程已经发生了改变。下面通过对5个实例的解释,你可以找到Angular应用的基本构建块,包括模型,视图,控制器,服务和过滤器,你可以在自己的浏览器中直接编辑。", 21 | "thumb":"https://img1.doubanio.com/view/movie_poster_cover/lpst/public/p2302137839.jpg" 22 | }, 23 | { 24 | "title": "火影忍者剧场版:博人传", 25 | "desc": "直到现在,你或许已经听说过AngularJS了,一个改变你对web应用思考方式,由谷歌开发的令人兴奋的开源框架。关于它的文章已经写得非常之多,但我发现还是要写些给那些更喜欢快速且实际例子的开发者。当今对web编程已经发生了改变。下面通过对5个实例的解释,你可以找到Angular应用的基本构建块,包括模型,视图,控制器,服务和过滤器,你可以在自己的浏览器中直接编辑。", 26 | "thumb":"https://img3.doubanio.com/view/movie_poster_cover/lpst/public/p2306653420.jpg" 27 | }, 28 | { 29 | "title": "功夫熊猫3", 30 | "desc": "直到现在,你或许已经听说过AngularJS了,一个改变你对web应用思考方式,由谷歌开发的令人兴奋的开源框架。关于它的文章已经写得非常之多,但我发现还是要写些给那些更喜欢快速且实际例子的开发者。当今对web编程已经发生了改变。下面通过对5个实例的解释,你可以找到Angular应用的基本构建块,包括模型,视图,控制器,服务和过滤器,你可以在自己的浏览器中直接编辑。", 31 | "thumb":"https://img1.doubanio.com/view/movie_poster_cover/lpst/public/p2319273504.jpg" 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /hello_angularjs/angularjs_rootScope.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 18 | 19 | 20 | 21 |
22 |
23 | 34 |
35 |
36 |
37 |

Demo1: $scope根节点$rootScope

38 |
39 |
输出:Hello, {{name}}
40 |
41 |
42 |
43 |

Demo1: Controller $scope

44 |
45 |
输出:Hello, {{name}}
46 |
47 |
48 |
49 |
50 | 51 | 52 | 53 | 62 | -------------------------------------------------------------------------------- /app_i18n/i18n/resources-locale_default.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key":"_Greeting_", 4 | "value":"Site localization example using the resource localization service", 5 | "description":"Home page greeting text" 6 | }, 7 | { 8 | "key":"_HomeTitle_", 9 | "value":"Resource Localization Service", 10 | "description":"Home page title text" 11 | }, 12 | { 13 | "key":"_HomeControllerTitle_", 14 | "value":"List Example", 15 | "description":"Home Pane Title" 16 | }, 17 | { 18 | "key":"_HomeControllerBlob_", 19 | "value":"Now is the time for all good men to come to the aide of their country.", 20 | "description":"text example" 21 | }, 22 | { 23 | "key":"_FormControllerTitle_", 24 | "value":"Form example", 25 | "description":"Add/Edit Person Form Title" 26 | }, 27 | { 28 | "key":"_FirstNameLabel_", 29 | "value":"First Name", 30 | "description":"Label for first name field" 31 | }, 32 | { 33 | "key":"_LastNameLabel_", 34 | "value":"Last Name", 35 | "description":"Label for last name field" 36 | }, 37 | { 38 | "key":"_EMailLabel_", 39 | "value":"Email", 40 | "description":"Label for email field" 41 | }, 42 | { 43 | "key":"_BioLabel_", 44 | "value":"Bio (tell us something about you) ", 45 | "description":"Label for biography field" 46 | }, 47 | { 48 | "key":"_SaveButtonLabel_", 49 | "value":"Save", 50 | "description":"Label for Save button" 51 | }, 52 | { 53 | "key":"_CancelButtonLabel_", 54 | "value":"Cancel", 55 | "description":"Label for Cancel button" 56 | }, 57 | { 58 | "key":"_NameHeader_", 59 | "value":"Name", 60 | "description":"Person List Name Header" 61 | }, 62 | { 63 | "key":"_EmailHeader_", 64 | "value":"Email", 65 | "description":"Person List Name Header" 66 | }, 67 | { 68 | "key":"_BioHeader_", 69 | "value":"Biography", 70 | "description":"Person List Bio Header" 71 | } 72 | ] 73 | -------------------------------------------------------------------------------- /angularjs_crud/assets/js/app.js: -------------------------------------------------------------------------------- 1 | angular.module('CrudApp', [ 'ngRoute']).config(['$routeProvider', function($routeProvider) { 2 | $routeProvider.when('/', {templateUrl: 'assets/tpl/lists.html', controller: ListCtrl}). 3 | when('/add-user', {templateUrl: 'assets/tpl/add-new.html', controller: AddCtrl}). 4 | when('/edit/:id', {templateUrl: 'assets/tpl/edit.html', controller: EditCtrl}). 5 | otherwise({redirectTo: '/'}); 6 | }]); 7 | 8 | 9 | function ListCtrl($scope, $http) { 10 | //$http.get('assets/data/users.json').success(function(data) { 11 | // console.log(data); 12 | // $scope.users = data.users; 13 | //}); 14 | var users=[ 15 | { 16 | "username":"zhangsan", 17 | "first_name":"张", 18 | "last_name":"三", 19 | "address":"成都天府软件园地址1" 20 | }, 21 | { 22 | "username":"lisi", 23 | "first_name":"李", 24 | "last_name":"四", 25 | "address":"成都天府软件园地址2" 26 | }, 27 | { 28 | "username": "wangwu", 29 | "first_name": "王", 30 | "last_name": "五", 31 | "address": "成都天府软件园地址3" 32 | } 33 | ]; 34 | 35 | $scope.users=[]; 36 | $scope.users=users; 37 | } 38 | 39 | function AddCtrl($scope, $http, $location) { 40 | $scope.add_new = function(user, AddNewForm) { 41 | console.log(user); 42 | $scope.users.push(user); 43 | console.log($scope.users); 44 | $location.path('/'); 45 | }; 46 | } 47 | 48 | function EditCtrl($scope, $http, $location, $routeParams) { 49 | var id = $routeParams.id; 50 | $scope.activePath = null; 51 | 52 | $http.get('api/users/'+id).success(function(data) { 53 | $scope.users = data; 54 | }); 55 | 56 | $scope.update = function(user){ 57 | $http.put('api/users/'+id, user).success(function(data) { 58 | $scope.users = data; 59 | $scope.activePath = $location.path('/'); 60 | }); 61 | }; 62 | 63 | $scope.delete = function(user) { 64 | console.log(user); 65 | 66 | var deleteUser = confirm('Are you absolutely sure you want to delete?'); 67 | if (deleteUser) { 68 | $http.delete('api/users/'+user.id); 69 | $scope.activePath = $location.path('/'); 70 | } 71 | }; 72 | } -------------------------------------------------------------------------------- /angularjs_factory_service/angularjs_factory_service.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 12 | 13 | 14 | 15 |
16 |
17 | 28 |
29 |
30 |

AngularJS IOC依赖注入示例

31 |
32 | 33 |
34 |
35 |
36 | 37 | 38 | 39 | 40 | 66 | -------------------------------------------------------------------------------- /todos/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | todos 5 | 6 | 20 | 21 | 22 | 23 | 24 |
25 |
26 | 27 | 30 |
31 |
32 |
33 | 34 |
35 |
36 | 39 |
40 |
41 | 42 | 43 |
44 |
45 |
46 | 47 |
48 | 49 | 50 |
51 |
52 |
53 |
54 |
55 |
56 |

57 | TODO项目,后台使用node,express,mongoose提供restful[GET,POST,PUT,DELETE]风格的API,前台使用angular,bootstrap 58 |

59 |
60 | 61 |
62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /angularjs_controller/angularjs_controller2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS· Controller 6 | 7 | 13 | 14 | 15 |
16 |
17 | 28 |
29 |
30 |

Demo1-Controller

31 |
32 |
    33 |
  • 34 | {{phone.name}} 35 |

    {{phone.snippet}}

    36 |
  • 37 |
38 |
39 |
40 |
41 | 42 | 43 | 44 | 62 | 63 | -------------------------------------------------------------------------------- /angularjs_service/angularjs_service2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 12 | 13 | 14 |
15 |
16 | 27 |
28 |

AngularJS service数据共享示例

29 |
30 |
31 | 32 |
33 |
34 |
35 | 36 | 37 | 38 | 65 | -------------------------------------------------------------------------------- /static/js/angular-1.3.15/angular-cookies.min.js.map: -------------------------------------------------------------------------------- 1 | { 2 | "version":3, 3 | "file":"angular-cookies.min.js", 4 | "lineCount":7, 5 | "mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAmBtCD,CAAAE,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,QAAA,CA0BW,UA1BX,CA0BuB,CAAC,YAAD,CAAe,UAAf,CAA2B,QAAQ,CAACC,CAAD,CAAaC,CAAb,CAAuB,CAAA,IACvEC,EAAU,EAD6D,CAEvEC,EAAc,EAFyD,CAGvEC,CAHuE,CAIvEC,EAAU,CAAA,CAJ6D,CAKvEC,EAAOV,CAAAU,KALgE,CAMvEC,EAAcX,CAAAW,YAGlBN,EAAAO,UAAA,CAAmB,QAAQ,EAAG,CAC5B,IAAIC,EAAiBR,CAAAC,QAAA,EACjBE,EAAJ,EAA0BK,CAA1B,GACEL,CAGA,CAHqBK,CAGrB,CAFAH,CAAA,CAAKG,CAAL,CAAqBN,CAArB,CAEA,CADAG,CAAA,CAAKG,CAAL,CAAqBP,CAArB,CACA,CAAIG,CAAJ,EAAaL,CAAAU,OAAA,EAJf,CAF4B,CAA9B,CAAA,EAUAL,EAAA,CAAU,CAAA,CAKVL,EAAAW,OAAA,CASAC,QAAa,EAAG,CAAA,IACVC,CADU,CAEVC,CAFU,CAIVC,CAGJ,KAAKF,CAAL,GAAaV,EAAb,CACMI,CAAA,CAAYL,CAAA,CAAQW,CAAR,CAAZ,CAAJ,EACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBhB,CAAvB,CAKJ,KAAKgB,CAAL,GAAaX,EAAb,CACEY,CAKA,CALQZ,CAAA,CAAQW,CAAR,CAKR,CAJKjB,CAAAoB,SAAA,CAAiBF,CAAjB,CAIL,GAHEA,CACA,CADQ,EACR,CADaA,CACb,CAAAZ,CAAA,CAAQW,CAAR,CAAA,CAAgBC,CAElB,EAAIA,CAAJ,GAAcX,CAAA,CAAYU,CAAZ,CAAd,GACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBC,CAAvB,CACA,CAAAC,CAAA,CAAU,CAAA,CAFZ,CAOF,IAAIA,CAAJ,CAIE,IAAKF,CAAL,GAFAI,EAEaf,CAFID,CAAAC,QAAA,EAEJA,CAAAA,CAAb,CACMA,CAAA,CAAQW,CAAR,CAAJ,GAAsBI,CAAA,CAAeJ,CAAf,CAAtB,GAEMN,CAAA,CAAYU,CAAA,CAAeJ,CAAf,CAAZ,CAAJ,CACE,OAAOX,CAAA,CAAQW,CAAR,CADT,CAGEX,CAAA,CAAQW,CAAR,CAHF,CAGkBI,CAAA,CAAeJ,CAAf,CALpB,CAhCU,CAThB,CAEA,OAAOX,EA1BoE,CAA1D,CA1BvB,CAAAH,QAAA,CAoIW,cApIX;AAoI2B,CAAC,UAAD,CAAa,QAAQ,CAACmB,CAAD,CAAW,CAErD,MAAO,CAWLC,IAAKA,QAAQ,CAACC,CAAD,CAAM,CAEjB,MAAO,CADHN,CACG,CADKI,CAAA,CAASE,CAAT,CACL,EAAQxB,CAAAyB,SAAA,CAAiBP,CAAjB,CAAR,CAAkCA,CAFxB,CAXd,CA0BLQ,IAAKA,QAAQ,CAACF,CAAD,CAAMN,CAAN,CAAa,CACxBI,CAAA,CAASE,CAAT,CAAA,CAAgBxB,CAAA2B,OAAA,CAAeT,CAAf,CADQ,CA1BrB,CAuCLU,OAAQA,QAAQ,CAACJ,CAAD,CAAM,CACpB,OAAOF,CAAA,CAASE,CAAT,CADa,CAvCjB,CAF8C,CAAhC,CApI3B,CAnBsC,CAArC,CAAD,CAwMGzB,MAxMH,CAwMWA,MAAAC,QAxMX;", 6 | "sources":["angular-cookies.js"], 7 | "names":["window","angular","undefined","module","factory","$rootScope","$browser","cookies","lastCookies","lastBrowserCookies","runEval","copy","isUndefined","addPollFn","currentCookies","$apply","$watch","push","name","value","updated","isString","browserCookies","$cookies","get","key","fromJson","put","toJson","remove"] 8 | } 9 | -------------------------------------------------------------------------------- /angularjs_controller/angularjs_controller_multiple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS· Controller 6 | 7 | 13 | 14 | 15 |
16 |
17 | 28 |
29 |
30 |

Demo1-HelloController

31 |
32 |

输出:{{user.name}} say, welcome to visit {{user.website}}

33 |
34 |

Demo2-TimerController

35 |
36 |

输出:{{clock.now}}

37 |
38 |
39 |
40 | 41 | 42 | 43 | 67 | -------------------------------------------------------------------------------- /angularjs_ngtemplate/data/citys.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"label":"北京Beijing010","name":"北京","pinyin":"Beijing","zip":"010"}, 3 | {"label":"北京区域1","name":"北京测试1","pinyin":"Beijing","zip":"010"}, 4 | {"label":"北京区域2","name":"北京测试2","pinyin":"Beijing","zip":"010"}, 5 | {"label":"北京Beijing010","name":"北京测试3","pinyin":"Beijing","zip":"010"}, 6 | {"label":"北京Beijing010","name":"北京测试4","pinyin":"Beijing","zip":"010"}, 7 | {"label":"北京Beijing010","name":"北京测试5","pinyin":"Beijing","zip":"010"}, 8 | {"label":"北京Beijing010","name":"北京测试6","pinyin":"Beijing","zip":"010"}, 9 | {"label":"重庆Chongqing023","name":"重庆","pinyin":"Chongqing","zip":"023"}, 10 | {"label":"上海Shanghai021","name":"上海","pinyin":"Shanghai","zip":"021"}, 11 | {"label":"天津Tianjin022","name":"天津","pinyin":"Tianjin","zip":"022"}, 12 | {"label":"长春Changchun0431","name":"长春","pinyin":"Changchun","zip":"0431"}, 13 | {"label":"长沙Changsha0731","name":"长沙","pinyin":"Changsha","zip":"0731"}, 14 | {"label":"常州Changzhou0519","name":"常州","pinyin":"Changzhou","zip":"0519"}, 15 | {"label":"成都Chengdu028","name":"成都","pinyin":"Chengdu","zip":"028"}, 16 | {"label":"成都JinNiu","name":"成都地区1","pinyin":"Chengdu","zip":"028"}, 17 | {"label":"成都Chengdu028","name":"成都地区2","pinyin":"Chengdu","zip":"028"}, 18 | {"label":"成都Chengdu028","name":"成都地区3","pinyin":"Chengdu","zip":"028"}, 19 | {"label":"成都Chengdu028","name":"成都地区4","pinyin":"Chengdu","zip":"028"}, 20 | {"label":"成都Chengdu028","name":"成都地区5","pinyin":"Chengdu","zip":"028"}, 21 | {"label":"大连Dalian0411","name":"大连","pinyin":"Dalian","zip":"0411"}, 22 | {"label":"东莞Dongguan0769","name":"东莞","pinyin":"Dongguan","zip":"0769"}, 23 | {"label":"佛山Foshan0757","name":"佛山","pinyin":"Foshan","zip":"0757"}, 24 | {"label":"福州Fuzhou0591","name":"福州","pinyin":"Fuzhou","zip":"0591"}, 25 | {"label":"广州Guangzhou020","name":"广州","pinyin":"Guangzhou","zip":"020"}, 26 | {"label":"贵阳Guiyang0851","name":"贵阳","pinyin":"Guiyang","zip":"0851"}, 27 | {"label":"哈尔滨Haerbin0451","name":"哈尔滨","pinyin":"Haerbin","zip":"0451"}, 28 | {"label":"海口Haikou0898","name":"海口","pinyin":"Haikou","zip":"0898"}, 29 | {"label":"邯郸Handan0310","name":"邯郸","pinyin":"Handan","zip":"0310"}, 30 | {"label":"杭州Hangzhou0571","name":"杭州","pinyin":"Hangzhou","zip":"0571"}, 31 | {"label":"合肥Hefei0551","name":"合肥","pinyin":"Hefei","zip":"0551"} 32 | ] -------------------------------------------------------------------------------- /app_i18n/Partials/form.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 |
5 |
6 |
7 |
8 | 9 | 10 | ? 11 | 12 |
13 |
14 |   15 |
16 |
17 | 18 | 19 | ? 20 | 21 |
22 |
23 |   24 |
25 |
26 | 27 | 28 | ? 29 | 30 |
31 |
32 |   33 |
34 |
35 | 36 |
37 |
38 |   39 |
40 |
41 | 42 | 43 |
44 |
45 |
46 |
-------------------------------------------------------------------------------- /angularjs_autocomplete/data/citys.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"label":"北京Beijing010","name":"北京","pinyin":"Beijing","zip":"010"}, 3 | {"label":"北京区域1","name":"北京测试1","pinyin":"Beijing","zip":"010"}, 4 | {"label":"北京区域2","name":"北京测试2","pinyin":"Beijing","zip":"010"}, 5 | {"label":"北京Beijing010","name":"北京测试3","pinyin":"Beijing","zip":"010"}, 6 | {"label":"北京Beijing010","name":"北京测试4","pinyin":"Beijing","zip":"010"}, 7 | {"label":"北京Beijing010","name":"北京测试5","pinyin":"Beijing","zip":"010"}, 8 | {"label":"北京Beijing010","name":"北京测试6","pinyin":"Beijing","zip":"010"}, 9 | {"label":"重庆Chongqing023","name":"重庆","pinyin":"Chongqing","zip":"023"}, 10 | {"label":"上海Shanghai021","name":"上海","pinyin":"Shanghai","zip":"021"}, 11 | {"label":"天津Tianjin022","name":"天津","pinyin":"Tianjin","zip":"022"}, 12 | {"label":"长春Changchun0431","name":"长春","pinyin":"Changchun","zip":"0431"}, 13 | {"label":"长沙Changsha0731","name":"长沙","pinyin":"Changsha","zip":"0731"}, 14 | {"label":"常州Changzhou0519","name":"常州","pinyin":"Changzhou","zip":"0519"}, 15 | {"label":"成都Chengdu028","name":"成都","pinyin":"Chengdu","zip":"028"}, 16 | {"label":"成都JinNiu","name":"成都地区1","pinyin":"Chengdu","zip":"028"}, 17 | {"label":"成都Chengdu028","name":"成都地区2","pinyin":"Chengdu","zip":"028"}, 18 | {"label":"成都Chengdu028","name":"成都地区3","pinyin":"Chengdu","zip":"028"}, 19 | {"label":"成都Chengdu028","name":"成都地区4","pinyin":"Chengdu","zip":"028"}, 20 | {"label":"成都Chengdu028","name":"成都地区5","pinyin":"Chengdu","zip":"028"}, 21 | {"label":"大连Dalian0411","name":"大连","pinyin":"Dalian","zip":"0411"}, 22 | {"label":"东莞Dongguan0769","name":"东莞","pinyin":"Dongguan","zip":"0769"}, 23 | {"label":"佛山Foshan0757","name":"佛山","pinyin":"Foshan","zip":"0757"}, 24 | {"label":"福州Fuzhou0591","name":"福州","pinyin":"Fuzhou","zip":"0591"}, 25 | {"label":"广州Guangzhou020","name":"广州","pinyin":"Guangzhou","zip":"020"}, 26 | {"label":"贵阳Guiyang0851","name":"贵阳","pinyin":"Guiyang","zip":"0851"}, 27 | {"label":"哈尔滨Haerbin0451","name":"哈尔滨","pinyin":"Haerbin","zip":"0451"}, 28 | {"label":"海口Haikou0898","name":"海口","pinyin":"Haikou","zip":"0898"}, 29 | {"label":"邯郸Handan0310","name":"邯郸","pinyin":"Handan","zip":"0310"}, 30 | {"label":"杭州Hangzhou0571","name":"杭州","pinyin":"Hangzhou","zip":"0571"}, 31 | {"label":"合肥Hefei0551","name":"合肥","pinyin":"Hefei","zip":"0551"} 32 | ] -------------------------------------------------------------------------------- /angularjs_directive_controller/angularjs_directive_contoller1_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 20 | 21 | 22 | 33 |
34 |

Demo1: 指令调用控制器中方法示例

35 |
36 | 37 |
38 |
39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /angularjs_app_site/app/js/controllers.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /* 控制器 */ 4 | 5 | angular.module('MyAPP') 6 | .controller('HomeCtrl', ['$rootScope', '$scope', '$location', '$localStorage', 'Main', function($rootScope, $scope, $location, $localStorage, Main) { 7 | 8 | $scope.signin = function() { 9 | var formData = { 10 | email: $scope.email, 11 | password: $scope.password 12 | } 13 | 14 | Main.signin(formData, function(res) { 15 | if (res.type == false) { 16 | alert(res.data) 17 | } else { 18 | $localStorage.token = res.data.token; 19 | window.location = "/"; 20 | } 21 | }, function() { 22 | $rootScope.error = '登录失败!'; 23 | }) 24 | }; 25 | 26 | $scope.signup = function() { 27 | var formData = { 28 | email: $scope.email, 29 | password: $scope.password 30 | } 31 | 32 | Main.save(formData, function(res) { 33 | if (res.type == false) { 34 | alert(res.data) 35 | } else { 36 | $localStorage.token = res.data.token; 37 | window.location = "/" 38 | } 39 | }, function() { 40 | $rootScope.error = '注册失败'; 41 | }) 42 | }; 43 | 44 | $scope.me = function() { 45 | Main.me(function(res) { 46 | $scope.myDetails = res; 47 | }, function() { 48 | $rootScope.error = '获取个人信息失败'; 49 | }) 50 | }; 51 | 52 | $scope.logout = function() { 53 | Main.logout(function() { 54 | window.location = "/" 55 | }, function() { 56 | alert("登出失败"); 57 | }); 58 | }; 59 | $scope.token = $localStorage.token; 60 | }]) 61 | 62 | .controller('MeCtrl', ['$rootScope', '$scope', '$location', 'Main', function($rootScope, $scope, $location, Main) { 63 | 64 | Main.me(function(res) { 65 | $scope.myDetails = res; 66 | }, function() { 67 | $rootScope.error = '获取个人信息失败'; 68 | }) 69 | }]); 70 | -------------------------------------------------------------------------------- /angularjs_event/angularjs_click.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 18 | 19 | 20 | 21 |
22 |
23 | 34 |
35 |
36 |
37 |

Demo1

38 |
输出:{{message}}
39 |
40 |
41 |

Demo2:ng-click事件

42 | 43 | subtract(1) 44 |
输出:{{counter}}
45 |
46 |
47 |
48 | 49 | 50 | 51 | 62 | -------------------------------------------------------------------------------- /angularjs-tutorial/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS Tutorial 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |

{{main.title}}

14 |
15 | 16 | 17 | 18 | 19 |
20 |

A list of TV shows

21 |
    22 |
  • {{show.title}} {{show.year}}
  • 23 |
24 | 25 |
26 |

Add a new TV Show

27 |
28 |
29 | 30 | 31 |
32 |
33 | 34 | 35 |
36 |
37 |
38 | 39 |
40 |
41 | 42 | 43 |
44 |
45 | 46 |
47 |
48 | 49 | -------------------------------------------------------------------------------- /angularjs_factory/angularjs_factory.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 12 | 13 | 14 |
15 |
16 | 27 |
28 |

AngularJS factory=示例

29 |
30 |
31 | 32 |
33 |
34 |
35 | 36 | 37 | 38 | 67 | -------------------------------------------------------------------------------- /angularjs_directive/views/footer.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 45 |
46 | 52 |
53 |
-------------------------------------------------------------------------------- /angularjs_directive_listview/views/footer_tpl.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 45 |
46 | 52 |
53 |
-------------------------------------------------------------------------------- /angularjs_directive_controller/angularjs_directive_contoller.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 20 | 21 | 22 | 33 |
34 |

Demo1: 指令调用控制器中方法示例

35 |
36 | 37 |
38 |
39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app_i18n/i18n/resources-locale_zh-CN.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key":"_Greeting_", 4 | "value":"使用资源本地化服务网站本地化的例子", 5 | "description":"Home page greeting text" 6 | }, 7 | { 8 | "key":"_HomeTitle_", 9 | "value":"资源本地化服务", 10 | "description":"Home page title text" 11 | }, 12 | { 13 | "key":"_HomeControllerTitle_", 14 | "value":"例子列表", 15 | "description":"Home Pane Title" 16 | }, 17 | { 18 | "key":"_HomeControllerBlob_", 19 | "value":"现在是人们帮助他们国家的时候了.", 20 | "description":"text example" 21 | }, 22 | { 23 | "key":"_FormControllerTitle_", 24 | "value":"例如", 25 | "description":"Add/Edit Person Form Title" 26 | }, 27 | { 28 | "key":"_FirstNameLabel_", 29 | "value":"姓", 30 | "description":"Label for first name field" 31 | }, 32 | { 33 | "key":"_FirstNameHelp_", 34 | "value":"请输入姓氏", 35 | "description":"Label for first name field" 36 | }, 37 | { 38 | "key":"_LastNameLabel_", 39 | "value":"名字", 40 | "description":"Label for last name field" 41 | }, 42 | { 43 | "key":"_LastNameHelp_", 44 | "value":"请输入你的名字", 45 | "description":"Label for last name field" 46 | }, 47 | { 48 | "key":"_EMailLabel_", 49 | "value":"邮箱", 50 | "description":"Label for email field" 51 | }, 52 | { 53 | "key":"_EMailHelp_", 54 | "value":"请输入一个有效的邮箱地址", 55 | "description":"Label for email field" 56 | }, 57 | { 58 | "key":"_BioLabel_", 59 | "value":"简介 (告诉我们一些关于你的事情) ", 60 | "description":"Label for biography field" 61 | }, 62 | { 63 | "key":"_SaveButtonLabel_", 64 | "value":"保存", 65 | "description":"Label for Save button" 66 | }, 67 | { 68 | "key":"_CancelButtonLabel_", 69 | "value":"取消", 70 | "description":"Label for Cancel button" 71 | }, 72 | { 73 | "key":"_NameHeader_", 74 | "value":"姓名", 75 | "description":"Person List Name Header" 76 | }, 77 | { 78 | "key":"_EmailHeader_", 79 | "value":"邮箱", 80 | "description":"Person List Name Header" 81 | }, 82 | { 83 | "key":"_BioHeader_", 84 | "value":"简介", 85 | "description":"Person List Bio Header" 86 | } 87 | ] 88 | -------------------------------------------------------------------------------- /angularjs_directive_controller/angularjs_directive_contoller1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 20 | 21 | 22 | 33 |
34 |

Demo1: 指令调用控制器中方法示例

35 |
36 | 37 |
38 |
39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app_i18n/i18n/resources-locale_es-es.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "key":"_Greeting_", 4 | "value":"iteSa ocalizationla xampleea singua heta esourcera ocalizationla ervicesa", 5 | "description":"Home page greeting text" 6 | }, 7 | { 8 | "key":"_HomeTitle_", 9 | "value":"esourceRa ocalizationLa erviceSa", 10 | "description":"Home page title text" 11 | }, 12 | { 13 | "key":"_HomeControllerTitle_", 14 | "value":"istLa xampleEa", 15 | "description":"Home Pane Title" 16 | }, 17 | { 18 | "key":"_FormControllerTitle_", 19 | "value":"ormFa xampleEa", 20 | "description":"Add/Edit Person Form Title" 21 | }, 22 | { 23 | "key":"_FirstNameLabel_", 24 | "value":"irstFa ameNa", 25 | "description":"Label for first name field" 26 | }, 27 | { 28 | "key":"_LastNameLabel_", 29 | "value":"astLa ameNa", 30 | "description":"Label for last name field" 31 | }, 32 | { 33 | "key":"_EMailLabel_", 34 | "value":"mailEa", 35 | "description":"Label for email field" 36 | }, 37 | { 38 | "key":"_BioLabel_", 39 | "value":"ioBa (ellta sua omethingsa boutaa ouya) ", 40 | "description":"Label for biography field" 41 | }, 42 | { 43 | "key":"_SaveButtonLabel_", 44 | "value":"aveSa", 45 | "description":"Label for Save button" 46 | }, 47 | { 48 | "key":"_CancelButtonLabel_", 49 | "value":"ancelCa", 50 | "description":"Label for Cancel button" 51 | }, 52 | { 53 | "key":"_NameHeader_", 54 | "value":"ameNa", 55 | "description":"Person List Name Header" 56 | }, 57 | { 58 | "key":"_EmailHeader_", 59 | "value":"mailEa", 60 | "description":"Person List Name Header" 61 | }, 62 | { 63 | "key":"_BioHeader_", 64 | "value":"iographyBa", 65 | "description":"Person List Bio Header" 66 | }, 67 | { 68 | "key":"_FirstNameHelp_", 69 | "value":"asjdaEsas", 70 | "description":"Person List Bio Header" 71 | }, 72 | { 73 | "key":"_LastNameHelp_", 74 | "value":"asdkHsas", 75 | "description":"Person List Bio Header" 76 | }, 77 | { 78 | "key":"_EMailHelp_", 79 | "value":"asdTjHX", 80 | "description":"Person List Bio Header" 81 | } 82 | ] 83 | -------------------------------------------------------------------------------- /angularjs_form_validation/angularjs_form_validation6.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Index 7 | 8 | 11 | 12 | 13 |
14 |
15 | 文章:http://www.cnblogs.com/rohelm/p/4033513.html 16 |
17 |
18 |
19 | 20 | 21 |
22 | 23 | 验证通过:{{custom_form.user_email.$valid}} 24 |
25 |
26 |
27 | 28 |
29 |
30 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /angularjs_ngsubmit/angularjs_ngsubmit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 27 | 28 | 29 | 30 |
31 |
32 |
33 |

Demo1: ng-submit示例

34 | 35 |
36 |

37 | 38 |

39 |
    40 |
  • 41 | {{person.name}}-{{person.age}} 42 |
  • 43 |
44 |
45 |
46 | 47 | 48 | 49 |
50 |
51 |
52 |
53 | 54 | 55 | 56 | 74 | -------------------------------------------------------------------------------- /angularjs_cookie/angularjs_cookie.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 13 | 14 | 15 | 16 |
17 |
18 | 29 |
30 |
31 |
32 |
33 |

{{title}}

34 |
    35 |
  • Name:{{person.name}}
  • 36 |
  • Age:{{person.age}}
  • 37 |
38 | 39 |
40 |
41 |
42 |
43 |
44 | 45 | 46 | 47 | 48 | 72 | -------------------------------------------------------------------------------- /angularjs_extention/angularjs_extention.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AngularJS·Hello AngularJS 6 | 7 | 18 | 19 | 20 | 21 |
22 |
23 | 34 |
35 |
36 |
37 |

Demo1:继承关系示例

38 |
39 |
40 |
输出:country-> {{person.country}}
41 | Show Person Info 42 |
{{person.name}}, {{person.address}}, {{person.gender}}, {{person.age}}
43 |
44 |
45 | 46 |
47 |
48 |
49 | 50 | 51 | 52 | 68 | --------------------------------------------------------------------------------