├── angular ├── ng-tut │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── app │ │ │ ├── app.component.css │ │ │ ├── app.component.html │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ └── app.component.spec.ts │ │ ├── styles.css │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── typings.d.ts │ │ ├── tsconfig.app.json │ │ ├── index.html │ │ ├── main.ts │ │ ├── tsconfig.spec.json │ │ ├── test.ts │ │ └── polyfills.ts │ ├── e2e │ │ ├── tsconfig.e2e.json │ │ ├── app.po.ts │ │ └── app.e2e-spec.ts │ ├── .editorconfig │ ├── tsconfig.json │ ├── .gitignore │ ├── protractor.conf.js │ ├── README.md │ ├── .angular-cli.json │ ├── package.json │ ├── karma.conf.js │ └── tslint.json ├── pragmatic │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── app │ │ │ ├── core │ │ │ │ ├── footer │ │ │ │ │ ├── footer.component.scss │ │ │ │ │ ├── footer.component.html │ │ │ │ │ ├── footer.component.ts │ │ │ │ │ └── footer.component.spec.ts │ │ │ │ ├── header │ │ │ │ │ ├── header.component.scss │ │ │ │ │ ├── header.component.html │ │ │ │ │ ├── header.component.spec.ts │ │ │ │ │ └── header.component.ts │ │ │ │ ├── auth-guard.service.spec.ts │ │ │ │ ├── auth-guard.service.ts │ │ │ │ └── core.module.ts │ │ │ ├── new-in-ng4 │ │ │ │ ├── reactive │ │ │ │ │ ├── reactive.component.scss │ │ │ │ │ ├── reactive.component.spec.ts │ │ │ │ │ ├── reactive.component.html │ │ │ │ │ └── reactive.component.ts │ │ │ │ ├── new-in-ng4.module.ts │ │ │ │ └── new-in-ng4-routing.module.ts │ │ │ ├── app.component.ts │ │ │ ├── app.component.html │ │ │ ├── app-routing.module.ts │ │ │ ├── app.component.scss │ │ │ ├── app.module.ts │ │ │ ├── utils │ │ │ │ └── type.ts │ │ │ ├── shared │ │ │ │ └── shared.module.ts │ │ │ ├── domain │ │ │ │ └── entities.interface.ts │ │ │ ├── reducers │ │ │ │ └── auth.reducer.ts │ │ │ ├── app.component.spec.ts │ │ │ └── actions │ │ │ │ └── auth.action.ts │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── typings.d.ts │ │ ├── tsconfig.app.json │ │ ├── main.ts │ │ ├── tsconfig.spec.json │ │ ├── index.html │ │ ├── test.ts │ │ ├── styles.scss │ │ └── polyfills.ts │ ├── e2e │ │ ├── tsconfig.e2e.json │ │ ├── app.po.ts │ │ └── app.e2e-spec.ts │ ├── .editorconfig │ ├── tsconfig.json │ ├── .gitignore │ ├── protractor.conf.js │ ├── README.md │ ├── .angular-cli.json │ ├── karma.conf.js │ ├── package.json │ └── tslint.json └── from0to1 │ └── chap01 │ └── hello-angular │ ├── src │ ├── assets │ │ └── .gitkeep │ ├── app │ │ ├── app.component.css │ │ ├── app.component.html │ │ ├── app.component.ts │ │ ├── login │ │ │ ├── login.component.ts │ │ │ └── login.component.spec.ts │ │ ├── app.module.ts │ │ └── app.component.spec.ts │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── styles.css │ ├── favicon.ico │ ├── typings.d.ts │ ├── tsconfig.app.json │ ├── index.html │ ├── main.ts │ ├── tsconfig.spec.json │ ├── test.ts │ └── polyfills.ts │ ├── e2e │ ├── tsconfig.e2e.json │ ├── app.po.ts │ └── app.e2e-spec.ts │ ├── .editorconfig │ ├── tsconfig.json │ ├── .gitignore │ ├── protractor.conf.js │ ├── .angular-cli.json │ ├── package.json │ ├── karma.conf.js │ └── tslint.json ├── angular2 ├── ng2-tut │ ├── src │ │ ├── assets │ │ │ ├── .gitkeep │ │ │ └── login_default_bg.jpg │ │ ├── app │ │ │ ├── todo │ │ │ │ ├── todo.component.css │ │ │ │ ├── todo-header │ │ │ │ │ ├── todo-header.component.html │ │ │ │ │ ├── todo-header.component.css │ │ │ │ │ ├── todo-header.component.spec.ts │ │ │ │ │ └── todo-header.component.ts │ │ │ │ ├── todo-item │ │ │ │ │ ├── todo-item.component.html │ │ │ │ │ ├── todo-item.component.ts │ │ │ │ │ ├── todo-item.component.css │ │ │ │ │ └── todo-item.component.spec.ts │ │ │ │ ├── todo-footer │ │ │ │ │ ├── todo-footer.component.ts │ │ │ │ │ ├── todo-footer.component.html │ │ │ │ │ ├── todo-footer.component.spec.ts │ │ │ │ │ └── todo-footer.component.css │ │ │ │ ├── todo.service.spec.ts │ │ │ │ ├── todo.component.html │ │ │ │ ├── todo-list │ │ │ │ │ ├── todo-list.component.css │ │ │ │ │ ├── todo-list.component.html │ │ │ │ │ ├── todo-list.component.spec.ts │ │ │ │ │ └── todo-list.component.ts │ │ │ │ ├── todo-routing.module.ts │ │ │ │ ├── todo.component.spec.ts │ │ │ │ ├── todo.module.ts │ │ │ │ ├── todo.component.ts │ │ │ │ └── todo.service.ts │ │ │ ├── playground │ │ │ │ ├── one │ │ │ │ │ ├── one.component.css │ │ │ │ │ ├── one.component.html │ │ │ │ │ ├── one.component.ts │ │ │ │ │ └── one.component.spec.ts │ │ │ │ ├── two │ │ │ │ │ ├── two.component.css │ │ │ │ │ ├── two.component.html │ │ │ │ │ ├── two.component.ts │ │ │ │ │ └── two.component.spec.ts │ │ │ │ ├── three │ │ │ │ │ ├── three.component.css │ │ │ │ │ ├── three.component.html │ │ │ │ │ ├── three.component.ts │ │ │ │ │ └── three.component.spec.ts │ │ │ │ ├── playground.component.css │ │ │ │ ├── trim-space.pipe.ts │ │ │ │ ├── log-on-click.directive.ts │ │ │ │ ├── form-demo │ │ │ │ │ ├── form-demo.component.ts │ │ │ │ │ ├── form-demo.component.css │ │ │ │ │ ├── form-demo.component.spec.ts │ │ │ │ │ └── form-demo.component.html │ │ │ │ ├── playground.component.spec.ts │ │ │ │ ├── playground.module.ts │ │ │ │ ├── playground-routing.module.ts │ │ │ │ ├── playground.component.html │ │ │ │ └── playground.component.ts │ │ │ ├── index.ts │ │ │ ├── login │ │ │ │ ├── register-dialog.component.css │ │ │ │ ├── login.component.css │ │ │ │ ├── login-routing.module.ts │ │ │ │ ├── bing-image.service.spec.ts │ │ │ │ ├── login.module.ts │ │ │ │ ├── login.component.spec.ts │ │ │ │ ├── register-dialog.component.html │ │ │ │ ├── bing-image.service.ts │ │ │ │ ├── login.component.html │ │ │ │ ├── login.component.ts │ │ │ │ └── register-dialog.component.ts │ │ │ ├── app.component.css │ │ │ ├── domain │ │ │ │ ├── state.ts │ │ │ │ └── entities.ts │ │ │ ├── actions │ │ │ │ ├── auth.action.ts │ │ │ │ └── todo.action.ts │ │ │ ├── shared │ │ │ │ └── shared.module.ts │ │ │ ├── core │ │ │ │ ├── auth.service.spec.ts │ │ │ │ ├── user.service.spec.ts │ │ │ │ ├── auth-guard.service.spec.ts │ │ │ │ ├── auth-guard.service.ts │ │ │ │ ├── core.module.ts │ │ │ │ ├── user.service.ts │ │ │ │ └── auth.service.ts │ │ │ ├── app-routing.module.ts │ │ │ ├── app.module.ts │ │ │ ├── app.component.html │ │ │ ├── app.component.ts │ │ │ ├── app.component.spec.ts │ │ │ ├── data.json │ │ │ └── reducers │ │ │ │ ├── auth.reducer.ts │ │ │ │ └── todo.reducer.ts │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── styles.css │ │ ├── typings.d.ts │ │ ├── main.ts │ │ ├── index.html │ │ ├── tsconfig.json │ │ ├── polyfills.ts │ │ ├── test.ts │ │ └── styles.scss │ ├── e2e │ │ ├── app.po.ts │ │ ├── app.e2e-spec.ts │ │ └── tsconfig.json │ ├── .editorconfig │ ├── .gitignore │ ├── protractor.conf.js │ ├── karma.conf.js │ ├── angular-cli.json │ ├── package.json │ └── tslint.json ├── playground │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── app │ │ │ ├── app.component.css │ │ │ ├── index.ts │ │ │ ├── app.component.html │ │ │ ├── app.component.ts │ │ │ ├── app.module.ts │ │ │ └── app.component.spec.ts │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── styles.css │ │ ├── favicon.ico │ │ ├── typings.d.ts │ │ ├── styles.scss │ │ ├── index.html │ │ ├── main.ts │ │ ├── tsconfig.json │ │ ├── polyfills.ts │ │ └── test.ts │ ├── e2e │ │ ├── app.po.ts │ │ ├── app.e2e-spec.ts │ │ └── tsconfig.json │ ├── .editorconfig │ ├── .gitignore │ ├── protractor.conf.js │ ├── README.md │ ├── karma.conf.js │ ├── angular-cli.json │ ├── package.json │ └── tslint.json └── .vscode │ ├── settings.json │ └── launch.json └── README.md /angular/ng-tut/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular/pragmatic/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular2/ng2-tut/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular/ng-tut/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular2/playground/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular2/ng2-tut/src/app/todo/todo.component.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /angular/from0to1/chap01/hello-angular/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular2/ng2-tut/src/app/playground/one/one.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular2/ng2-tut/src/app/playground/two/two.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular/from0to1/chap01/hello-angular/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular/pragmatic/src/app/core/footer/footer.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular/pragmatic/src/app/core/header/header.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular2/ng2-tut/src/app/playground/three/three.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular2/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | // 将设置放入此文件中以覆盖默认值和用户设置。 2 | { 3 | } -------------------------------------------------------------------------------- /angular/pragmatic/src/app/new-in-ng4/reactive/reactive.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular/ng-tut/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 | three works! 3 |
4 | -------------------------------------------------------------------------------- /angular2/ng2-tut/src/app/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app.component'; 2 | export * from './app.module'; 3 | -------------------------------------------------------------------------------- /angular2/playground/src/app/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app.component'; 2 | export * from './app.module'; 3 | -------------------------------------------------------------------------------- /angular/ng-tut/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /angular2/ng2-tut/src/app/login/register-dialog.component.css: -------------------------------------------------------------------------------- 1 | .status-bar { 2 | text-align: center; 3 | } 4 | -------------------------------------------------------------------------------- /angular/ng-tut/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular/pragmatic/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular2/ng2-tut/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular/from0to1/chap01/hello-angular/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |2 | two works! 3 |
4 |Without Pipe: Today is {{ birthday }}
2 |With Pipe: Today is {{ birthday | date:"MM/dd/yy" }}
3 |
`;
10 | }
11 |
--------------------------------------------------------------------------------
/angular/ng-tut/e2e/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { NgTutPage } from './app.po';
2 |
3 | describe('ng-tut App', () => {
4 | let page: NgTutPage;
5 |
6 | beforeEach(() => {
7 | page = new NgTutPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/angular2/ng2-tut/src/app/playground/three/three.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-three',
5 | templateUrl: './three.component.html',
6 | styleUrls: ['./three.component.css']
7 | })
8 | export class ThreeComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/angular2/playground/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 7 | login Works! 8 |
9 | `, 10 | styles: [] 11 | }) 12 | export class LoginComponent implements OnInit { 13 | 14 | constructor() { } 15 | 16 | ngOnInit() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /angular/from0to1/chap01/hello-angular/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |