hmf-branding
v20.0.11
Published
The `HamfekranBranding` library is an Angular component that provides a component that customize heead tag and favicon of project base on provided inputs . This library was generated using Angular CLI version 20.3.0 and supports Angular version ^20.3.0.
Readme
HamfekranBranding
The HamfekranBranding library is an Angular component that provides a component that customize heead tag and favicon of project base on provided inputs . This library was generated using Angular CLI version 20.3.0 and supports Angular version ^20.3.0.
Installation
To use this library in your project, install it via npm:
npm install hmf-brandingThen import the HmfBrandingModule into your Angular module:
import { HmfBrandingModule } from 'hmf-branding';
@NgModule({
declarations: [
AppComponent,
],
imports: [
HmfBrandingModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }Components
1. lib-hmfindex Component
The <lib-hmfindex></lib-hmfindex> component is the primary component in this library. It calls config endpoint and changes the title and icons of index.html base on provided input.
Inputs
| Name | Type | Description |
|---------------------------|--------------------|-------------------------------------------------------------------------------------------------|
| accessToken | string | access token value. |
| uuid | string | uuid value form auth. |
| configApiUrl | string | config api url. |
| lang | string | default value is fa-IR. |
| mode | 1|2|3 | test 1 , demo 2 , production 3. |
Outputs
| Name | Type | Description |
|--------------------------|----------------------|-------------------------------------------------------------------------------------------------|
| configApiOutput | lib_hmfindexOutPutRes | it returns the response of api or error as Method res, it also cotains logo and favicon url . |
Example Usage
<lib-hmfindex
[accessToken]="accessToken"
[uuid]="uuid"
[configApiUrl]="configApiUrl"
[lang]="lang"
[refreshTrigger]="trigger$"
(configApiOutput)="configApiOutput($event)">
</lib-hmfindex>Model Definitions
Below are the model interfaces used by the component:
Lib_Menu
export interface lib_hmfindexOutPutRes{
methodRes:any;
ThumbnailUrl:string,
logoUrl:string,
}notice
default Thumbnail is defaultThumbnail.svg (in case of no ename property)
