Project

General

Profile

« Previous | Next » 

Revision 56550

[Admin|Trunk]: Fix menu issus like connect.

View differences:

modules/uoa-admin-portal/trunk/src/app/app.component.ts
39 39
              private propertiesService: EnvironmentSpecificService,
40 40
              private _communitiesService: CommunitiesService,
41 41
              private router: Router) {
42
    this.router.events.forEach((event) => {
43
      if (event instanceof NavigationStart) {
44
        HelperFunctions.scroll();
45
        if(event.url === '/') {
46
          this.wellcome = true;
47
        } else {
48
          this.wellcome = false;
49
        }
50
      }
51
    });
42 52
  }
43 53

  
44 54
  ngOnInit() {
......
58 68
          this.isPortalAdministrator = Session.isPortalAdministrator();
59 69
        }
60 70
        this._communitiesService.updateCommunities(this.properties, this.properties.communityAPI + 'communities');
61
        this.router.events.forEach((event) => {
62
          if(event instanceof RoutesRecognized) {
63
            HelperFunctions.scroll();
64
            if(event.url === '/') {
65
              this.wellcome = true;
66
            } else {
67
              this.wellcome = false;
68
            }
69
            this.communityId = (event.state.root.firstChild.queryParams['communityId']) ? event.state.root.firstChild.queryParams['communityId'] : '';
71
        this.route.queryParams.subscribe(params => {
72
            this.communityId = (params['communityId']) ? params['communityId'] : '';
70 73

  
71 74
            this.communityType = null;
72 75
            this.menuItems = [];
......
143 146
                }
144 147
              }
145 148
            );
146
          }
147 149
        });
148 150
      });
149 151
  }

Also available in: Unified diff