projects
/
examples
/
angular-tutorial
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cart-Seite aus Tutorial implementiert
[examples/angular-tutorial]
/
src
/
app
/
cart
/
cart.component.ts
diff --git
a/src/app/cart/cart.component.ts
b/src/app/cart/cart.component.ts
index
c9276d4
..
500bd05
100644
(file)
--- a/
src/app/cart/cart.component.ts
+++ b/
src/app/cart/cart.component.ts
@@
-1,4
+1,5
@@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit } from '@angular/core';
+import { CartService } from '../cart.service';
@Component({
selector: 'app-cart',
@Component({
selector: 'app-cart',
@@
-7,9
+8,12
@@
import { Component, OnInit } from '@angular/core';
})
export class CartComponent implements OnInit {
})
export class CartComponent implements OnInit {
- constructor() { }
+ items;
+
+ constructor(private cartService: CartService) { }
ngOnInit() {
ngOnInit() {
+ this.items = this.cartService.getItems();
}
}
}
}