Skip to content

Commit b1b2d45

Browse files
upgrade all dependencies, use let and fat arrow
1 parent c5d8b31 commit b1b2d45

File tree

9 files changed

+13
-18
lines changed

9 files changed

+13
-18
lines changed

12-routing-final/app/components/cart/cart.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class CartComponent {
2323
}
2424

2525
calcTotalSum() {
26-
var sum = 0;
26+
let sum = 0;
2727

2828
this.currentCart.forEach(function (cartItem) {
2929
sum = sum + cartItem.price;

12-routing-final/app/components/navigation/navigation.component.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

12-routing-final/app/components/navigation/navigation.component.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

12-routing-final/app/components/navigation/navigation.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ export class NavigationComponent {
2222
ngOnInit() {
2323
this._cartService.update.subscribe(update => {
2424
if (update) {
25-
var self = this;
2625
this.cartUpdated = true;
27-
setTimeout(function () {
28-
self.cartUpdated = false;
26+
setTimeout(() => {
27+
this.cartUpdated = false;
2928
}, 500)
3029
}
3130
});

12-routing-final/app/components/pizza/detail/detail.component.js

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

12-routing-final/app/components/pizza/detail/detail.component.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

12-routing-final/app/components/pizza/detail/detail.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ export class PizzaDetailComponent {
1515
public pizza: Pizza;
1616
private _pizzaId: Number
1717
private _getPizza(pizzas: Array<Pizza>) {
18-
var i = 0;
19-
20-
for (i; i < pizzas.length; i = i + 1) {
18+
for (let i = 0; i < pizzas.length; i = i + 1) {
2119
if (pizzas[i].id === this._pizzaId) {
2220
this.pizza = pizzas[i];
2321

12-routing-final/app/pipes/pizzaSearch.pipe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {Pizza} from '../interfaces/pizza.interface';
44
@Pipe({name: 'pizzaSearch'})
55
export class PizzaSearchPipe implements PipeTransform {
66
transform(pizzas:Pizza[], searchString: string) : any {
7-
var matches = [];
7+
let matches = [];
88

99
if (!searchString) {
1010
return pizzas;

12-routing-final/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
"dependencies": {
1212
"angular2": "2.0.0-beta.17",
1313
"systemjs": "0.19.27",
14-
"es6-promise": "^3.0.2",
15-
"es6-shim": "^0.33.3",
14+
"es6-promise": "^3.1.2",
15+
"es6-shim": "^0.35.0",
1616
"reflect-metadata": "0.1.3",
1717
"rxjs": "5.0.0-beta.4",
1818
"zone.js": "0.6.12"
1919
},
2020
"devDependencies": {
21-
"concurrently": "^1.0.0",
22-
"lite-server": "^1.3.1",
21+
"concurrently": "^2.0.0",
22+
"lite-server": "^2.2.0",
2323
"typescript": "^1.8.10"
2424
}
2525
}

0 commit comments

Comments
 (0)