1.0.3 • Published 8 months ago

@casejs/angular-library v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

PHARAOH Angular Library

Angular library version of the PHARAOH application for the client.

Installation

NPM

npm i case-angular-library

Import module in app.module.ts :

import { CaseModule } from 'case-angular-library'
import { ReactiveFormsModule } from '@angular/forms'

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    AppRoutingModule,
    CommonModule,
    RouterModule,
    ReactiveFormsModule,
    CaseModule.forRoot({
      baseUrl: environment.baseUrl,
      apiBaseUrl: environment.apiBaseUrl,
      storagePath: environment.storagePath,
      appName: environment.appName,
      tokenName: environment.tokenName,
      tokenAllowedDomains: environment.tokenAllowedDomains,
      production: environment.production,
    }),
  ],
  providers: [],
  bootstrap: [AppComponent]
})

Add PHARAOH routes in app-routing.module.ts

const routes: Routes = [
  {
    path: '',
    component: HomeComponent,
    canActivate: [AuthGuard]
  }
]

routes.push(...(caseRoutes as Route[]))

Import PHARAOH styles in your main styles.scss file :

@import 'case-angular-library/styles/main';

Documentation

See https://pharaoh-docs.vercel.app/