Add title property in environment files to distinguish easier the environment
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
<logo>
|
||||
<a class="logo navbar-brand" routerLink="/">
|
||||
<img id="logo" src="./assets/images/codiki.png" alt="logo" />
|
||||
<span id="title">Codiki</span>
|
||||
<span id="title" *ngIf="!title">Codiki</span>
|
||||
<span id="title" *ngIf="title">Codiki - {{title}}</span>
|
||||
</a>
|
||||
</logo>
|
||||
<links>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Router } from '@angular/router';
|
||||
import { AuthService } from '../core/services/auth.service';
|
||||
import { Category } from '../core/entities';
|
||||
import { HeaderService } from './header.service';
|
||||
import { environment } from '../../environments/environment';
|
||||
|
||||
const SIDENAV_WIDTH = '300px';
|
||||
|
||||
@@ -14,6 +15,7 @@ const SIDENAV_WIDTH = '300px';
|
||||
export class HeaderComponent implements OnInit {
|
||||
isAdmin: boolean;
|
||||
listCategories: Array<Category> = [];
|
||||
title: string;
|
||||
|
||||
constructor(
|
||||
private authService: AuthService,
|
||||
@@ -22,6 +24,7 @@ export class HeaderComponent implements OnInit {
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.title = environment.title;
|
||||
this.isAdmin = this.authService.isAdmin();
|
||||
this.headerService.getAllCategories().subscribe(listCategories => {
|
||||
this.listCategories = listCategories;
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
apiUrl: 'http://192.168.0.153:8445',
|
||||
appVersion: '1.0'
|
||||
appVersion: '1.0',
|
||||
title: 'Intégration'
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
apiUrl: 'https://176.188.217.1:54444',
|
||||
appVersion: '1.0'
|
||||
appVersion: '1.0',
|
||||
title: ''
|
||||
};
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
export const environment = {
|
||||
production: false,
|
||||
apiUrl: 'http://localhost:8080',
|
||||
appVersion: '1.0'
|
||||
appVersion: '1.0',
|
||||
title: 'Développement'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user