Skip to content

Commit

Permalink
a bug fix with pipes sample plus recovery of the accidentally deleted…
Browse files Browse the repository at this point in the history
… files
  • Loading branch information
yfain committed Oct 7, 2016
1 parent 7c7a5da commit e5b6479
Show file tree
Hide file tree
Showing 520 changed files with 194 additions and 95 deletions.
Empty file modified appendixa/destructuring.html
100644 → 100755
Empty file.
Empty file modified appendixa/fatArrow.html
100644 → 100755
Empty file.
Empty file modified appendixa/forof.html
100644 → 100755
Empty file.
Empty file modified appendixa/generator.html
100644 → 100755
Empty file.
Empty file modified appendixa/gettersAndSetters.html
100644 → 100755
Empty file.
Empty file modified appendixa/hoisting.html
100644 → 100755
Empty file.
Empty file modified appendixa/let.html
100644 → 100755
Empty file.
Empty file modified appendixa/modules/babel/browser.js
100644 → 100755
Empty file.
Empty file modified appendixa/modules/babel/es6-module-loader.js
100644 → 100755
Empty file.
Empty file modified appendixa/modules/babel/main.js
100644 → 100755
Empty file.
Empty file modified appendixa/modules/babel/moduleLoader.html
100644 → 100755
Empty file.
Empty file modified appendixa/modules/babel/shipping.js
100644 → 100755
Empty file.
Empty file modified appendixa/modules/traceur/billing.js
100644 → 100755
Empty file.
Empty file modified appendixa/modules/traceur/es6-module-loader.js
100644 → 100755
Empty file.
Empty file modified appendixa/modules/traceur/moduleLoader.html
100644 → 100755
Empty file.
Empty file modified appendixa/modules/traceur/shipping.js
100644 → 100755
Empty file.
Empty file modified appendixa/optionalParameters.html
100644 → 100755
Empty file.
Empty file modified appendixa/promises.html
100644 → 100755
Empty file.
Empty file modified appendixa/rest.html
100644 → 100755
Empty file.
Empty file modified appendixa/spread.html
100644 → 100755
Empty file.
Empty file modified appendixa/static.html
100644 → 100755
Empty file.
Empty file modified appendixa/super.html
100644 → 100755
Empty file.
Empty file modified appendixa/templateStrings.html
100644 → 100755
Empty file.
Empty file modified appendixa/thisAndThat.html
100644 → 100755
Empty file.
Empty file modified appendixb/fatArrow.html
100644 → 100755
Empty file.
Empty file modified appendixb/index.html
100644 → 100755
Empty file.
23 changes: 23 additions & 0 deletions appendixb/ts/Person1.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified appendixb/ts/Person1.ts
100644 → 100755
Empty file.
Empty file modified appendixb/ts/calcTax.ts
100644 → 100755
Empty file.
18 changes: 18 additions & 0 deletions appendixb/ts/fatArrow.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified appendixb/ts/fatArrow.ts
100644 → 100755
Empty file.
Empty file modified appendixb/ts/interfaces/Employee.ts
100644 → 100755
Empty file.
Empty file modified appendixb/ts/interfaces/IPerson.ts
100644 → 100755
Empty file.
Empty file modified appendixb/ts/interfaces/Person.ts
100644 → 100755
Empty file.
Empty file modified appendixb/ts/interfaces/custom_type_sample.ts
100644 → 100755
Empty file.
23 changes: 23 additions & 0 deletions appendixb/ts/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified appendixb/ts/main.ts
100644 → 100755
Empty file.
7 changes: 7 additions & 0 deletions appendixb/ts/modules/PayBand.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified appendixb/ts/modules/PayBand.ts
100644 → 100755
Empty file.
50 changes: 50 additions & 0 deletions appendixb/ts/modules/Payroll.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified appendixb/ts/modules/Payroll.ts
100644 → 100755
Empty file.
Empty file modified appendixb/tsconfig.json
100644 → 100755
Empty file.
Empty file modified appendixb/typings/angular2/angular2.d.ts
100644 → 100755
Empty file.
Empty file modified appendixb/typings/es6-promise/es6-promise.d.ts
100644 → 100755
Empty file.
Empty file modified appendixb/typings/rx/rx-lite.d.ts
100644 → 100755
Empty file.
Empty file modified appendixb/typings/rx/rx.d.ts
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/.gitignore
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/karma-test-runner.js
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/karma.conf.js
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/package.json
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app.module.ts
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app.routing.ts
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app/about/about.css
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app/about/about.html
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app/about/about.ts
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app/app.css
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app/app.html
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app/app.spec.ts
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app/app.ts
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app/home/home.css
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app/home/home.html
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/app/home/home.ts
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/index.html
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/main.aot.ts
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/main.ts
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/typings.d.ts
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/src/vendor.ts
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/tsconfig.aot.json
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/tsconfig.json
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions chapter10/angular2-webpack-starter/webpack.config.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module.exports = {
new CommonsChunkPlugin({name: 'vendor', filename: 'vendor.bundle.js', minChunks: Infinity}),
new DefinePlugin({'webpack': {'ENV': JSON.stringify(metadata.env)}}),
new ContextReplacementPlugin(
// needed as a workaround for the Angular's internal use System.import()
// The (\\|\/) piece accounts for path separators in *nix and Windows
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
path.join(__dirname, 'src') // location of your src
Expand Down
Empty file modified chapter10/angular2-webpack-starter/webpack.prod.config.aot.js
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/webpack.prod.config.js
100644 → 100755
Empty file.
Empty file modified chapter10/angular2-webpack-starter/webpack.test.config.js
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion chapter10/auction/client/package.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"@angular/router": "^3.0.0",
"reflect-metadata": "^0.1.8",
"core-js": "^2.4.0",
"rxjs": "5.0.0-beta.12",
Expand Down
Empty file modified chapter10/auction/client/src/app/app.module.ts
100644 → 100755
Empty file.
Empty file.
Empty file modified chapter10/auction/client/src/typings.d.ts
100644 → 100755
Empty file.
Empty file modified chapter10/auction/server/package.json
100644 → 100755
Empty file.
Empty file modified chapter10/basic-webpack-starter/.gitignore
100644 → 100755
Empty file.
23 changes: 11 additions & 12 deletions chapter10/basic-webpack-starter/package.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,23 @@
"start": "webpack-dev-server --inline --progress --port 8080"
},
"dependencies": {
"@angular/common": "2.0.0-rc.6",
"@angular/compiler": "2.0.0-rc.6",
"@angular/core": "2.0.0-rc.6",
"@angular/http": "2.0.0-rc.6",
"@angular/platform-browser": "2.0.0-rc.6",
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
"@angular/router": "3.0.0-rc.2",
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"reflect-metadata": "^0.1.8",
"rxjs": "5.0.0-beta.11",
"rxjs": "5.0.0-beta.12",
"systemjs": "^0.19.37",
"zone.js": "0.6.17"
"zone.js": "0.6.21"
},
"devDependencies": {
"@types/es6-shim": "0.0.31",
"copy-webpack-plugin": "^3.0.1",
"ts-loader": "^0.8.2",
"typescript": "^2.0.0",
"typescript": "2.0.0",
"webpack": "2.1.0-beta.21",
"webpack-dev-server": "2.1.0-beta.0"
}
"webpack-dev-server": "2.1.0-beta.0"}
}
Empty file modified chapter10/basic-webpack-starter/src/app.module.ts
100644 → 100755
Empty file.
Empty file modified chapter10/basic-webpack-starter/src/app.routing.ts
100644 → 100755
Empty file.
Empty file modified chapter10/basic-webpack-starter/src/app/about.ts
100644 → 100755
Empty file.
Empty file modified chapter10/basic-webpack-starter/src/app/app.ts
100644 → 100755
Empty file.
Empty file modified chapter10/basic-webpack-starter/src/app/home.ts
100644 → 100755
Empty file.
Empty file modified chapter10/basic-webpack-starter/src/index.html
100644 → 100755
Empty file.
Empty file modified chapter10/basic-webpack-starter/src/main.ts
100644 → 100755
Empty file.
Empty file modified chapter10/basic-webpack-starter/src/vendor.ts
100644 → 100755
Empty file.
Empty file modified chapter10/basic-webpack-starter/tsconfig.json
100644 → 100755
Empty file.
Empty file modified chapter10/basic-webpack-starter/webpack.config.js
100644 → 100755
Empty file.
Empty file modified chapter10/hello-world-devserver/index.html
100644 → 100755
Empty file.
Empty file modified chapter10/hello-world-devserver/main.js
100644 → 100755
Empty file.
8 changes: 4 additions & 4 deletions chapter10/hello-world-devserver/package.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "first-project",
"name": "first-webpack-project",
"version": "1.0.0",
"description": "",
"description": "Hello world with webpack-dev-server",
"main": "main.js",
"scripts": {
"start": "webpack-dev-server"
Expand All @@ -10,7 +10,7 @@
"author": "",
"license": "ISC",
"devDependencies": {
"webpack": "2.1.0-beta.21",
"webpack-dev-server": "2.1.0-beta.0"
"webpack": "^2.1.0-beta.21",
"webpack-dev-server": "^2.1.0-beta.0"
}
}
Empty file modified chapter10/hello-world-devserver/webpack.config.js
100644 → 100755
Empty file.
Empty file modified chapter10/hello-world/bundle.js
100644 → 100755
Empty file.
Empty file modified chapter10/hello-world/index.html
100644 → 100755
Empty file.
Empty file modified chapter10/hello-world/main.js
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/.gitignore
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/app/app.component.js
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/app/app.component.ngfactory.ts
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/app/app.component.ts
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/app/app.module.js
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/app/app.module.ngfactory.ts
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/app/app.module.ts
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/app/main.js
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/app/main.ts
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/index.html
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/package.json
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/systemjs.config.js
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed-aop/tsconfig.json
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed/.gitignore
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed/app/app.component.ts
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed/app/app.module.ts
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed/app/main.ts
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed/index.html
100644 → 100755
Empty file.
Empty file modified chapter2/angular-seed/package.json
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion chapter2/angular-seed/systemjs.config.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ System.config({
'@angular/platform-browser' : {main: 'platform-browser.umd.min.js'},
'@angular/platform-browser-dynamic': {main: 'platform-browser-dynamic.umd.min.js'}
}
});
});
Empty file modified chapter2/angular-seed/tsconfig.json
100644 → 100755
Empty file.
Empty file modified chapter2/auction/.gitignore
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/app.module.ts
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/application/application.css
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/application/application.html
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/application/application.ts
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/carousel/carousel.html
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/carousel/carousel.ts
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/footer/footer.html
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/footer/footer.ts
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/navbar/navbar.html
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/navbar/navbar.ts
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/product-item/product-item.html
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/product-item/product-item.ts
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/search/search.html
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/search/search.ts
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/stars/stars.html
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/components/stars/stars.ts
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/main.ts
100644 → 100755
Empty file.
Empty file modified chapter2/auction/app/services/product-service.ts
100644 → 100755
Empty file.
Empty file modified chapter2/auction/index.html
100644 → 100755
Empty file.
Empty file modified chapter2/auction/package.json
100644 → 100755
Empty file.
Empty file modified chapter2/auction/systemjs.config.js
100644 → 100755
Empty file.
Empty file modified chapter2/auction/tsconfig.json
100644 → 100755
Empty file.
Empty file modified chapter2/directive-example/index.html
100644 → 100755
Empty file.
Empty file modified chapter2/directive-example/index.ts
100644 → 100755
Empty file.
Empty file modified chapter2/directive-example/tsconfig.json
100644 → 100755
Empty file.
Empty file modified chapter2/hello-world-es5/index.html
100644 → 100755
Empty file.
Empty file modified chapter2/hello-world-es5/main.js
100644 → 100755
Empty file.
Empty file modified chapter2/hello-world-es6/index.html
100644 → 100755
Empty file.
Empty file modified chapter2/hello-world-es6/main.js
100644 → 100755
Empty file.
Empty file modified chapter2/hello-world-ts-jquery/index.html
100644 → 100755
Empty file.
Empty file modified chapter2/hello-world-ts-jquery/main.ts
100644 → 100755
Empty file.
Empty file modified chapter2/hello-world-ts/index.html
100644 → 100755
Empty file.
Empty file modified chapter2/hello-world-ts/main.ts
100644 → 100755
Empty file.
Empty file modified chapter2/systemjs-demo/es5module.js
100644 → 100755
Empty file.
Empty file modified chapter2/systemjs-demo/es6module.js
100644 → 100755
Empty file.
Empty file modified chapter2/systemjs-demo/index.html
100644 → 100755
Empty file.
Empty file modified chapter3/.gitignore
100644 → 100755
Empty file.
Empty file modified chapter3/auction/.gitignore
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/app.module.ts
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/application/application.css
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/application/application.html
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/application/application.ts
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/carousel/carousel.html
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/carousel/carousel.ts
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/footer/footer.html
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/footer/footer.ts
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/home/home.css
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/home/home.ts
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/navbar/navbar.html
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/navbar/navbar.ts
100644 → 100755
Empty file.
Empty file.
Empty file modified chapter3/auction/app/components/product-item/product-item.css
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/product-item/product-item.html
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/product-item/product-item.ts
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/search/search.html
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/search/search.ts
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/stars/stars.html
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/components/stars/stars.ts
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/main.ts
100644 → 100755
Empty file.
Empty file modified chapter3/auction/app/services/product-service.ts
100644 → 100755
Empty file.
Empty file modified chapter3/auction/index.html
100644 → 100755
Empty file.
Empty file modified chapter3/auction/package.json
100644 → 100755
Empty file.
Empty file modified chapter3/auction/systemjs.config.js
100644 → 100755
Empty file.
Empty file modified chapter3/auction/tsconfig.json
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/.gitignore
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/components/404.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/components/app.component.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/components/app.routing.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/components/home.ts
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified chapter3/router_samples/app/components/luxury/luxury.module.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/components/product-child.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/components/product-data.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/components/product-description.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/components/product-param-data.ts
100644 → 100755
Empty file.
8 changes: 5 additions & 3 deletions chapter3/router_samples/app/components/product-param.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import {ActivatedRoute} from '@angular/router';
export class ProductDetailComponentParam {
productID: string;

constructor(route: ActivatedRoute) {
this.productID = route.snapshot.params['id'];
constructor(private route: ActivatedRoute) {
this.productID = route.snapshot.params['id'];

/* this.route.params.subscribe(

// Subscribing for receiving changing params
/*this.route.params.subscribe(
params => this.productID = params['id']
);*/

Expand Down
Empty file modified chapter3/router_samples/app/components/product.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/components/seller.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/guards/login.guard.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/guards/unsaved_changes.guard.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/main-aux.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/main-child.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/main-luxury-lazy.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/main-luxury.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/main-navigate.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/main-param-data.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/main-param.ts
100644 → 100755
Empty file.
Empty file modified chapter3/router_samples/app/main-with-404.ts
100644 → 100755
Empty file.
44 changes: 25 additions & 19 deletions chapter3/router_samples/app/main-with-guard-di.ts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
import {bootstrap} from '@angular/platform-browser-dynamic';
import {Component} from '@angular/core';
import {Component, NgModule } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { BrowserModule } from '@angular/platform-browser';
import {LocationStrategy, HashLocationStrategy} from '@angular/common';
import {provideRouter, ROUTER_DIRECTIVES} from '@angular/router';
import { Routes, RouterModule } from '@angular/router';
import {HomeComponent} from "./components/home";
import {ProductDetailComponent} from "./components/product";
import {LoginGuard} from "./guards/login.guard";
import {UnsavedChangesGuard} from "./guards/unsaved_changes.guard";

import {HomeComponent} from './components/home';
import {ProductDetailComponent} from './components/product';

import {LoginGuard} from './guards/login.guard';
import {UnsavedChangesGuard} from './guards/unsaved_changes.guard';
const routes: Routes = [
{path: '', component: HomeComponent},
{path: 'product', component: ProductDetailComponent,
canActivate:[LoginGuard], canDeactivate:[UnsavedChangesGuard]}
];

@Component({
selector: 'basic-routing',
directives: [ROUTER_DIRECTIVES],
template: `
<a [routerLink]="['/']">Home</a>
<a [routerLink]="['/product']">Product Details</a>
<router-outlet></router-outlet>
`
})
class RootComponent {
class AppComponent {

constructor (private _loginGuard:LoginGuard){}
}

bootstrap(RootComponent, [
provideRouter([
{path: '', component: HomeComponent},
{path: 'product', component: ProductDetailComponent,
canActivate:[LoginGuard], canDeactivate:[UnsavedChangesGuard]}
]),
LoginGuard, UnsavedChangesGuard,
{provide: LocationStrategy, useClass: HashLocationStrategy}
]);

@NgModule({
imports: [ BrowserModule, RouterModule.forRoot(routes)],
declarations: [ AppComponent, HomeComponent, ProductDetailComponent],
providers:[{provide: LocationStrategy, useClass: HashLocationStrategy},
LoginGuard, UnsavedChangesGuard],
bootstrap: [ AppComponent ]
})
class AppModule { }

platformBrowserDynamic().bootstrapModule(AppModule);
Empty file modified chapter3/router_samples/app/main-with-guard.ts
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions chapter3/router_samples/app/main.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './components/app.component';
import {HomeComponent} from "./components/home";
import {ProductDetailComponent} from "./components/product";
import {LocationStrategy, HashLocationStrategy} from '@angular/common';
import {LocationStrategy, HashLocationStrategy, APP_BASE_HREF} from '@angular/common';
import {routing} from './components/app.routing';

@NgModule({
imports: [ BrowserModule, routing ],
declarations: [ AppComponent, HomeComponent, ProductDetailComponent],
providers:[{provide: LocationStrategy, useClass: HashLocationStrategy}],
//providers:[{provide: APP_BASE_HREF, useValue: '/'}],
//providers:[{provide: APP_BASE_HREF, useValue: '/'}], // requires configuring redirects on web server
bootstrap: [ AppComponent ]
})
class AppModule { }
Expand Down
2 changes: 0 additions & 2 deletions chapter3/router_samples/index.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<html>
<head>
<title>Chapter 3: Routing Samples</title>
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>

<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion chapter3/router_samples/package.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"@angular/router": "^3.0.0",

"core-js": "^2.4.0",
"rxjs": "5.0.0-beta.12",
Expand Down
31 changes: 2 additions & 29 deletions chapter3/router_samples/systemjs.config.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ System.config({
'@angular/*': {'format': 'cjs'}
},
packages: {
'app' : {main: 'main', defaultExtension: 'ts'},
'app' : {main: 'main-with-guard', defaultExtension: 'ts'},
'rxjs' : {main: 'Rx'},
'@angular/core' : {main: 'core.umd.min.js'},
'@angular/common' : {main: 'common.umd.min.js'},
Expand All @@ -23,31 +23,4 @@ System.config({
'@angular/platform-browser' : {main: 'platform-browser.umd.min.js'},
'@angular/platform-browser-dynamic': {main: 'platform-browser-dynamic.umd.min.js'}
}
});




/*
System.config({
transpiler: 'typescript',
typescriptOptions: {emitDecoratorMetadata: true},
map: {
'@angular': 'node_modules/@angular'
},
paths: {
'node_modules/@angular/!*': 'node_modules/@angular/!*!/bundles'
},
meta: {
'@angular/!*': {'format': 'cjs'}
},
packages: {
'app' : {main: 'main-luxury-lazy', defaultExtension: 'ts'},
'@angular/core' : {main: 'core.umd.min.js'},
'@angular/common' : {main: 'common.umd.min.js'},
'@angular/compiler' : {main: 'compiler.umd.min.js'},
'@angular/router' : {main: 'router.umd.min.js'},
'@angular/platform-browser' : {main: 'platform-browser.umd.min.js'},
'@angular/platform-browser-dynamic': {main: 'platform-browser-dynamic.umd.min.js'}
}
});*/
});
Empty file modified chapter3/router_samples/tsconfig.json
100644 → 100755
Empty file.
Empty file modified chapter4/auction/.gitignore
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/app.module.ts
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/application/application.css
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/application/application.html
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/application/application.ts
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/carousel/carousel.html
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/carousel/carousel.ts
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/footer/footer.html
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/footer/footer.ts
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/home/home.css
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/home/home.ts
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/navbar/navbar.html
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/navbar/navbar.ts
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified chapter4/auction/app/components/product-item/product-item.css
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/product-item/product-item.html
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/product-item/product-item.ts
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/search/search.html
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/search/search.ts
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/stars/stars.html
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/components/stars/stars.ts
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/main.ts
100644 → 100755
Empty file.
Empty file modified chapter4/auction/app/services/product-service.ts
100644 → 100755
Empty file.
Empty file modified chapter4/auction/index.html
100644 → 100755
Empty file.
Empty file modified chapter4/auction/package.json
100644 → 100755
Empty file.
Empty file modified chapter4/auction/systemjs.config.js
100644 → 100755
Empty file.
Empty file modified chapter4/auction/tsconfig.json
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/.gitignore
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/app/components/product.ts
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/app/main-basic.ts
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/app/main-factory.ts
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/app/main-multiple-interface.ts
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/app/main-opaque-token.ts
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/app/main.ts
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/app/main_multiple_abstract.ts
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/app/services/product-service.ts
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/index.html
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/package.json
100644 → 100755
Empty file.
Empty file modified chapter4/di_samples/systemjs.config.js
100644 → 100755
Empty file.
Empty file modified chapter5/auction/.gitignore
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/app.module.ts
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/application/application.css
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/application/application.html
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/application/application.ts
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/carousel/carousel.html
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/carousel/carousel.ts
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/footer/footer.html
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/footer/footer.ts
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/home/home.css
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/home/home.ts
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/navbar/navbar.html
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/navbar/navbar.ts
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/pipes/filter-pipe.ts
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified chapter5/auction/app/components/product-item/product-item.css
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/product-item/product-item.html
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/product-item/product-item.ts
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/search/search.html
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/search/search.ts
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/stars/stars.html
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/components/stars/stars.ts
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/main.ts
100644 → 100755
Empty file.
Empty file modified chapter5/auction/app/services/product-service.ts
100644 → 100755
Empty file.
Empty file modified chapter5/auction/index.html
100644 → 100755
Empty file.
Empty file modified chapter5/auction/package.json
100644 → 100755
Empty file.
Empty file modified chapter5/auction/systemjs.config.js
100644 → 100755
Empty file.
Empty file modified chapter5/auction/tsconfig.json
100644 → 100755
Empty file.
Empty file modified chapter5/bindings_and_events/.gitignore
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified chapter5/bindings_and_events/app/binding/template-binding.ts
100644 → 100755
Empty file.
Empty file modified chapter5/bindings_and_events/app/binding/two-way-binding.ts
100644 → 100755
Empty file.
Empty file.
Empty file.
4 changes: 1 addition & 3 deletions chapter5/bindings_and_events/app/pipes/pipe-tester.ts
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import {TemperaturePipe} from './temperature-pipe';

@Component({
selector: 'app',
pipes:[TemperaturePipe],

template:`<input type='text' value="0"
placeholder= "Enter temperature" [(ngModel)] = "temp">
<button (click)="toggleFormat()">Toggle Format</button>
Expand All @@ -31,7 +29,7 @@ class AppComponent {
}
@NgModule({
imports: [ BrowserModule, FormsModule],
declarations: [ AppComponent],
declarations: [ AppComponent, TemperaturePipe],
bootstrap: [ AppComponent ]
})
class AppModule { }
Expand Down
Empty file modified chapter5/bindings_and_events/app/pipes/temperature-pipe.ts
100644 → 100755
Empty file.
4 changes: 1 addition & 3 deletions chapter5/bindings_and_events/index.html
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
<script src="node_modules/intl/locale-data/jsonp/en.js"></script -->
<script src="https://cdn.polyfill.io/v2/polyfill.js?features=Intl.~locale.en"></script>

<script src="node_modules/typescript/lib/typescript.js"></script>
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>

<script src="node_modules/typescript/lib/typescript.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="systemjs.config.js"></script>
<script>
Expand Down
Empty file modified chapter5/bindings_and_events/package.json
100644 → 100755
Empty file.
Loading

0 comments on commit e5b6479

Please sign in to comment.