npm.io
20.0.11 • Published 2d ago

hmf-branding

Licence
Version
20.0.11
Deps
1
Size
20 kB
Vulns
0
Weekly
0

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-branding

Then 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

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)