2.20220428.1 • Published 2 years ago

@xbim/flex-webkit v2.20220428.1

Weekly downloads
6,069
License
-
Repository
-
Last release
2 years ago

xbim Flex Webkit

Flex Webkit provides an Angular 'core' module enabling a Flex application to be easily built and bootstrapped so you can get on with developing the 'interesting' functionality.

It provides the following features:

  • OAuth2 authentication and Angular Route Guards for Authentication and Tenant authorization
  • State-Management using NGXS, supporting OData querying and CRUD mechanisms
  • Logging using ngx-logger
  • Simple boot-strapping

Getting started

A typical app.module.ts will look something like

import { environment } from '../environments/environment';

const routes: Routes = [
  {
    path: 'yourAuthenticatedPage',
    canActivate: [AuthGuard],
    component: SomeComponent,
  },
  {
    path: ':tenantId/yourApplication',
    canActivate: [AuthGuard, TenantGuard], // Ensure user is logged in and has access to tenant
    loadChildren: () =>
      import('./lazyModule/yourapp.module').then((m) => m.YourAppModule), // Lazy loaded module
    pathMatch: 'full',
  },
  /* Other routes */
];

@NgModule({
  declarations: [
    // Your components
  ],
  imports: [
    NgxsRouterPluginModule.forRoot(),
    NgxsReduxDevtoolsPluginModule.forRoot({ name: environment.appName }),
    LoggerModule.forRoot({
      level: environment.production
        ? NgxLoggerLevel.INFO
        : NgxLoggerLevel.DEBUG,
      enableSourceMaps: true,
    }),
    BrowserModule,
    BrowserAnimationsModule,
    RouterModule.forRoot(routes),
    FlexWebkitModule.forRoot(environment),
    HttpClientModule,
    // any other modules
  ],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}

State Management

TBC

2.20220317.1

2 years ago

2.20220428.1

2 years ago

2.20220109.3

2 years ago

1.20220109.2

2 years ago

1.20210712.1

3 years ago

1.20210712.5

3 years ago

1.20210711.5

3 years ago

1.20210624.2

3 years ago

1.20210211.4

3 years ago

1.20210122.2

3 years ago

1.20201112.1

3 years ago

1.20200929.2

4 years ago

1.20200911.1

4 years ago

1.20200818.4

4 years ago

1.20200812.1

4 years ago

1.20200811.3

4 years ago

1.20200808.1

4 years ago

1.20200807.6

4 years ago

1.20200807.7

4 years ago

1.20200717.1

4 years ago

1.20200619.2

4 years ago

1.20200406.6

4 years ago

1.20200220.1

4 years ago