Add title property in environment files to distinguish easier the environment

This commit is contained in:
2018-06-03 20:42:25 +02:00
parent a25ea175b5
commit ab58bcba7e
5 changed files with 11 additions and 4 deletions

View File

@@ -2,7 +2,8 @@
<logo> <logo>
<a class="logo navbar-brand" routerLink="/"> <a class="logo navbar-brand" routerLink="/">
<img id="logo" src="./assets/images/codiki.png" alt="logo" /> <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> </a>
</logo> </logo>
<links> <links>

View File

@@ -3,6 +3,7 @@ import { Router } from '@angular/router';
import { AuthService } from '../core/services/auth.service'; import { AuthService } from '../core/services/auth.service';
import { Category } from '../core/entities'; import { Category } from '../core/entities';
import { HeaderService } from './header.service'; import { HeaderService } from './header.service';
import { environment } from '../../environments/environment';
const SIDENAV_WIDTH = '300px'; const SIDENAV_WIDTH = '300px';
@@ -14,6 +15,7 @@ const SIDENAV_WIDTH = '300px';
export class HeaderComponent implements OnInit { export class HeaderComponent implements OnInit {
isAdmin: boolean; isAdmin: boolean;
listCategories: Array<Category> = []; listCategories: Array<Category> = [];
title: string;
constructor( constructor(
private authService: AuthService, private authService: AuthService,
@@ -22,6 +24,7 @@ export class HeaderComponent implements OnInit {
) {} ) {}
ngOnInit() { ngOnInit() {
this.title = environment.title;
this.isAdmin = this.authService.isAdmin(); this.isAdmin = this.authService.isAdmin();
this.headerService.getAllCategories().subscribe(listCategories => { this.headerService.getAllCategories().subscribe(listCategories => {
this.listCategories = listCategories; this.listCategories = listCategories;

View File

@@ -6,5 +6,6 @@
export const environment = { export const environment = {
production: false, production: false,
apiUrl: 'http://192.168.0.153:8445', apiUrl: 'http://192.168.0.153:8445',
appVersion: '1.0' appVersion: '1.0',
title: 'Intégration'
}; };

View File

@@ -1,5 +1,6 @@
export const environment = { export const environment = {
production: true, production: true,
apiUrl: 'https://176.188.217.1:54444', apiUrl: 'https://176.188.217.1:54444',
appVersion: '1.0' appVersion: '1.0',
title: ''
}; };

View File

@@ -6,5 +6,6 @@
export const environment = { export const environment = {
production: false, production: false,
apiUrl: 'http://localhost:8080', apiUrl: 'http://localhost:8080',
appVersion: '1.0' appVersion: '1.0',
title: 'Développement'
}; };