lacuna-spa
    TypeScript icon, indicating that this package has built-in type declarations

    2.4.0-beta.1 • Public • Published

    LacunaSpa

    LacunaSpa is a framework that includes common parts of Lacuna's recent products, and, thus, was born as a code reuse strategy.

    • This package in intended to work with Angular 7.X.X

    This Angular package includes common services, pipes, guards, components and API.

    Besides using the resources mentioned above, you can also use its "LacunaSpaRouteTree" function inside your routing module's forRoot(), so that it returns the pre-configured Lacuna common route tree. Inside this function, you can configure the specific routes of your application.

    While configuring a specific route level, you can also use the function "ManagementRoutes", which returns an array of routes for management of subscriptions, users, applications, and so on.

    Example (Inside AppModule)

    import { genLacunaSpaRouteTree, LacunaSpaModule } from 'lacuna-spa';
    
    //...
    
    @NgModule({
      declarations: [
        //...
      ],
      imports: [
        //...,
        LacunaSpaModule.forRoot({
          listOfRoles: ['Admin', 'Manager', 'Worker'],
          requiredIdClaims: ['cpf'],
          //...
        }),
        RouterModule.forRoot(LacunaSpaRouteTree(
          {
            homeComponent: WelcomeComponent,
            layoutComponent: LayoutComponent,
          },
          {
            privateRoutes: [
              //...,
            ],
            subscriptionRoutes: [
              //...,
              ...ManagementRoutes({ subscriptionDetailComponent: SubscriptionDetailComponent }),
            ],
          }
        ))
      ],
      providers: [],
      bootstrap: [AppComponent]
    })
    export class AppModule { }
    
    //...

    Keywords

    none

    Install

    npm i lacuna-spa

    DownloadsWeekly Downloads

    2

    Version

    2.4.0-beta.1

    License

    MIT

    Unpacked Size

    8.78 MB

    Total Files

    454

    Last publish

    Collaborators

    • lacuna-dev