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

3.0.0-beta.11 • 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 { }

//...

Readme

Keywords

none

Package Sidebar

Install

npm i lacuna-spa

Weekly Downloads

225

Version

3.0.0-beta.11

License

MIT

Unpacked Size

3.92 MB

Total Files

351

Last publish

Collaborators

  • lacuna-dev