summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/app.component.ts
diff options
context:
space:
mode:
authorcyuamber <xuranyjy@chinamobile.com>2019-11-20 18:02:21 +0800
committercyuamber <xuranyjy@chinamobile.com>2019-11-20 18:02:27 +0800
commite83217f0f442f6ad2c376a384b7dcd2232b254bd (patch)
tree8f4fa899e62a2789e13a33c0102e0cbe0829b1b1 /usecaseui-portal/src/app/app.component.ts
parentc2e8154a82ff9c2ad16ede6dc488150628cb17b3 (diff)
feat: change the main menu to face the nsmf requirement
Change-Id: I1c835e2798d91a929fb8aac54ff30229a0b85ee5 Issue-ID: USECASEUI-352 Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/app.component.ts')
-rw-r--r--usecaseui-portal/src/app/app.component.ts51
1 files changed, 29 insertions, 22 deletions
diff --git a/usecaseui-portal/src/app/app.component.ts b/usecaseui-portal/src/app/app.component.ts
index d8dad5f9..90d5606f 100644
--- a/usecaseui-portal/src/app/app.component.ts
+++ b/usecaseui-portal/src/app/app.component.ts
@@ -13,33 +13,33 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-import {Component} from '@angular/core';
-import {TranslateService} from '@ngx-translate/core';
-import {ServiceListService} from "./core/services/serviceList.service";
-import {HomesService} from "./core/services/homes.service";
-import {NavigationEnd, Router} from '@angular/router';
+import { Component } from '@angular/core';
+import { TranslateService } from '@ngx-translate/core';
+import { ServiceListService } from "./core/services/serviceList.service";
+import { HomesService } from "./core/services/homes.service";
+import { NavigationEnd, Router } from '@angular/router';
import 'rxjs/add/operator/map';
@Component({
- selector: 'app-root',
- templateUrl: './app.component.html',
- styleUrls: ['./app.component.less']
+ selector: 'app-root',
+ templateUrl: './app.component.html',
+ styleUrls: ['./app.component.less']
})
export class AppComponent {
- public url:string = 'home';
- constructor(private translate: TranslateService,private myhttp: HomesService,private router:Router,) {
+ public url: string = 'home';
+ constructor(private translate: TranslateService, private myhttp: HomesService, private router: Router, ) {
this.currentLanguageGet();
this.getUrl();
}
// Get the current routing path
- getUrl(){
- this.router.events.map(event=> {
- if(event instanceof NavigationEnd){
+ getUrl() {
+ this.router.events.map(event => {
+ if (event instanceof NavigationEnd) {
this.url = event['urlAfterRedirects'].slice(1)
}
- }).subscribe(event=>{})
+ }).subscribe(event => { })
}
//209.05.08 Get the currentLanguage
@@ -51,28 +51,35 @@ export class AppComponent {
this.myhttp.getCurrentLanguage(this.currentloginId)
.subscribe(
(data) => {
- console.log(data,"-------------getCurrentLanguage");
+ console.log(data, "-------------getCurrentLanguage");
this.currentLanguage = data.languageAlias.toLowerCase();
this.translate.use(this.currentLanguage);
- sessionStorage.setItem("DefaultLang",this.currentLanguage);
+ sessionStorage.setItem("DefaultLang", this.currentLanguage);
},
(err) => {
console.log(err);
}
)
- }else {
+ } else {
this.translate.setDefaultLang(this.currentLanguage);
- sessionStorage.setItem("DefaultLang",this.currentLanguage);
+ sessionStorage.setItem("DefaultLang", this.currentLanguage);
}
}
// Whether the submenu expands the identifier
- get flag () {
- if(!this.url.indexOf('services')){
+ get flag() {
+ if (!this.url.indexOf('services')) {
return true
- }else{
+ } else {
return false
}
}
-
+ get monitorflag() {
+ if (!this.url.indexOf('fcaps')) {
+ return true
+ } else {
+ return false
+ }
+ }
+
}