Commit 291fac09 authored by kpandey's avatar kpandey

updated

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174817 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0e660b2b
......@@ -6,6 +6,12 @@ import {CartActions, CategoryActions, MenuActions, WishListActions} from './ecm-
import { HostUrlService } from './host-url.service';
import { Store } from '@ngrx/store';
import { ECMSigninService } from './ecm-signin/ecm-signin.service';
import {Injectable} from "@angular/core";
import {Http, Response, Headers, RequestOptions} from "@angular/http";
import {Observable} from "rxjs/Rx";
@Component({
selector: 'ecm-root',
templateUrl: './app.component.html',
......@@ -16,7 +22,8 @@ export class AppComponent {
title = 'Proteus ECM';
location: Location;
locationPath: string = "";
constructor(location: Location, private store: Store<AppState>, private cartAction: CartActions, private categoryAction: CategoryActions, private menuAction:MenuActions, private wishListAction: WishListActions, public hostUrlService : HostUrlService) {
constructor(location: Location, private store: Store<AppState>, public signinService: ECMSigninService, private http:Http, private cartAction: CartActions, private categoryAction: CategoryActions, private menuAction:MenuActions, private wishListAction: WishListActions, public hostUrlService : HostUrlService) {
this.location = location;
this.locationPath = this.location.path(true);
console.log( ' this.locationPath[' + this.locationPath + ']');
......@@ -35,8 +42,14 @@ export class AppComponent {
this.setItem('TOKEN_ID', this.get('TOKEN_ID'), true );
this.setItem('ECM_TYPE', this.get('ECM_TYPE'), true );
this.signinService.fetchUserData().subscribe(
response => {
if(response){
this.store.dispatch(this.cartAction.loadCartItems());
this.store.dispatch(this.wishListAction.loadWishlistItems());
}
}
)
this.store.dispatch(this.categoryAction.loadCategories());
this.store.dispatch(this.menuAction.loadMenu());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment