File

src/widgets/logo/logo.component.ts

Implements

OnInit

Metadata

selector app-logo
templateUrl ./logo.component.html

Index

Properties
Methods
Inputs

Constructor

constructor(logoServ: LogoService)
Parameters :
Name Type Optional Description
logoServ LogoService

Inputs

hide

Methods

Public ngOnInit
ngOnInit()
Returns : void

Properties

Public logo
logo: any
Type : any
import { Component, Input, OnInit } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { LogoService } from '../../services/logo.service';

@Component( {
    selector: 'app-logo',
    templateUrl: './logo.component.html'
})
export class LogoComponent implements OnInit {
  public logo: any;
  @Input() hide = '';

  constructor(
    private logoServ: LogoService
  ) { }

  public ngOnInit() {
    this.logoServ.getCurrent().subscribe((logo) => {
      this.logo = logo;
    });
  }
}
<!-- Logo -->
<a href="#" routerLink="/" class="logo"> <!-- mini logo for sidebar mini 50x50 pixels -->
	<ng-container *ngIf="hide !== 'mini'">
		<ng-container *ngIf="logo?.html_mini; else oldsyntaxmini">
			<span class="logo-mini" [innerHtml]="logo?.html_mini | safeHtml"></span>
		</ng-container>
		<ng-template #oldsyntaxmini>
			<span class="logo-mini"><b>{{logo.small.bold}}</b>{{logo.small.normal}}</span> <!-- logo for regular state and mobile devices -->
		</ng-template>
	</ng-container>

	<ng-container *ngIf="hide !== 'lg'">
		<ng-container *ngIf="logo?.html_lg; else oldsyntaxlg">
			<span class="logo-lg" [innerHtml]="logo?.html_lg | safeHtml"></span>
		</ng-container>
		<ng-template #oldsyntaxlg>
			<span class="logo-lg" ><b>{{logo.big.bold}}</b>{{logo.big.normal}}</span>
		</ng-template>
	</ng-container>
</a>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""