Commit 7298cc0b authored by prumde's avatar prumde

Added Navigation Menu Entries


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@174465 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6fa2a1fd
...@@ -2,8 +2,8 @@ import { Component } from '@angular/core'; ...@@ -2,8 +2,8 @@ import { Component } from '@angular/core';
import {Location, LocationStrategy, PathLocationStrategy} from '@angular/common'; import {Location, LocationStrategy, PathLocationStrategy} from '@angular/common';
import {AppState} from './ecm-store/reducers'; import {AppState} from './ecm-store/reducers';
import {CartActions} from './ecm-store/actions'; import {CartActions, CategoryActions, MenuActions} from './ecm-store/actions';
import {CategoryActions} from './ecm-store/actions';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
@Component({ @Component({
selector: 'ecm-root', selector: 'ecm-root',
...@@ -14,7 +14,7 @@ import { Store } from '@ngrx/store'; ...@@ -14,7 +14,7 @@ import { Store } from '@ngrx/store';
export class AppComponent { export class AppComponent {
title = 'Proteus ECM'; title = 'Proteus ECM';
location: Location; location: Location;
constructor(location: Location, private store: Store<AppState>, private cartActions: CartActions, private categoryAction: CategoryActions) { constructor(location: Location, private store: Store<AppState>, private cartActions: CartActions, private categoryAction: CategoryActions, private menuAction:MenuActions) {
this.location = location; this.location = location;
console.log( ' this.location.path(true)[' + this.location.path(true) + ']'); console.log( ' this.location.path(true)[' + this.location.path(true) + ']');
this.checkAppState(); this.checkAppState();
...@@ -24,8 +24,10 @@ export class AppComponent { ...@@ -24,8 +24,10 @@ export class AppComponent {
this.setItem('appstate', this.get('app_stat'), true ); this.setItem('appstate', this.get('app_stat'), true );
this.setItem('TOKEN_ID', this.get('TOKEN_ID'), true ); this.setItem('TOKEN_ID', this.get('TOKEN_ID'), true );
this.store.dispatch(this.cartActions.loadCartItems()); this.store.dispatch(this.cartActions.loadCartItems());
this.store.dispatch(this.categoryAction.loadCategories()); this.store.dispatch(this.categoryAction.loadCategories());
this.store.dispatch(this.menuAction.loadMenu());
} }
get(name){ get(name){
var retVal = 'undefined'; var retVal = 'undefined';
......
...@@ -60,8 +60,8 @@ import { EcmProductDetailService } from './ecm-product-details/ecm-product-detai ...@@ -60,8 +60,8 @@ import { EcmProductDetailService } from './ecm-product-details/ecm-product-detai
import { EcmLocationService } from './ecm-search/ecm-location.service'; import { EcmLocationService } from './ecm-search/ecm-location.service';
import reducer from './ecm-store/reducers'; import reducer from './ecm-store/reducers';
import {CartActions, CategoryActions, SubCategoryActions, ItemActions, LocationActions, WishListActions} from './ecm-store/actions'; import {CartActions, CategoryActions, SubCategoryActions, ItemActions, LocationActions, WishListActions, MenuActions} from './ecm-store/actions';
import {CartEffects, CategoryEffects, SubCategoryEffects, ItemEffects, WishlistEffects} from './ecm-store/effects'; import {CartEffects, CategoryEffects, SubCategoryEffects, ItemEffects, WishlistEffects, MenuEffects} from './ecm-store/effects';
import { EcmPanelComponent, ECMDialog } from './ecm-view/ecm-panel/ecm-panel.component'; import { EcmPanelComponent, ECMDialog } from './ecm-view/ecm-panel/ecm-panel.component';
//Changes by Prajyot //Changes by Prajyot
...@@ -132,7 +132,8 @@ const appRoutes: Routes = [ ...@@ -132,7 +132,8 @@ const appRoutes: Routes = [
EffectsModule.run(CategoryEffects), EffectsModule.run(CategoryEffects),
EffectsModule.run(SubCategoryEffects), EffectsModule.run(SubCategoryEffects),
EffectsModule.run(ItemEffects), EffectsModule.run(ItemEffects),
EffectsModule.run(WishlistEffects) EffectsModule.run(WishlistEffects),
EffectsModule.run(MenuEffects)
], ],
providers: [ providers: [
{provide: LocationStrategy, useClass: HashLocationStrategy}, {provide: LocationStrategy, useClass: HashLocationStrategy},
...@@ -151,7 +152,8 @@ const appRoutes: Routes = [ ...@@ -151,7 +152,8 @@ const appRoutes: Routes = [
EcmProductDetailService, EcmProductDetailService,
LocationActions, LocationActions,
EcmLocationService, EcmLocationService,
WishListActions WishListActions,
MenuActions
], ],
entryComponents: [ entryComponents: [
EcmOutingComponent, EcmOutingComponent,
......
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