@gafacloud/naaora-front-core
v0.0.1
Published
Tha naaora front Core Library, All you need to build Naaora Rest API and Use Common core tools like interceptors, resolver, models, enum ...
Maintainers
Readme
NaaoraFrontCore
This library was generated with Angular CLI version 17.0.8.
Installation
This Library can be installed in your Angular project by calling npm install @gafacloud/naaora-front-core
How to use it
Once the Library is installed please follow this steps :
- Add the Library in App Module
- Init the Library by passing the config value to it
Here is an example of how the import and the library configuration works :
import { CONFIG_TOKEN, ConfigLibrary, NaaoraFrontCoreModule } from 'naaora-front-core';
/**
* Naaora Front Core Configuration Library
*/
const config: ConfigLibrary = {
baseUrl: environment.baseUrl,
templateId: environment.templateId
}
@NgModule({
declarations: [AppComponent, AboutUsComponent],
imports: [
BrowserModule,
...
],
providers: [
{
provide: APP_INITIALIZER,
useFactory: appInit,
multi: true,
deps: [ShoppingCartService, TemplateConfigService, CookieService],
},
...
{ provide: CONFIG_TOKEN, useValue: config }
Build
Once the Library imported and configured pleas Run ng build to see if you have some errors related to it.
Tips
Sometimes you will have some error such as an item is not exported in the library or something like that, if it is the case please clear the angular cash by deleting the folde .angular
