1.2.6 • Published 4 years ago

@digitalmedarbeider/multi-tenant v1.2.6

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

Multi-Tenant Module

========================================

This library is an angular module providing multi-tenant support

Quick start

Install this package

npm install @digitalmedarbeider/multi-tenant

Prepare the configuration

import { DiMeMultiTenantConfig, MultiTenantModule, MultitenantInterceptor } from '@digitalmedarbeider/multi-tenant';

const multitenantConfig:DiMeMultiTenantConfig={
  key:"tenantId",
  tenantResolveURL:"",
  interceptDomains:[environment.api_url]
}

Prepare the interceptors:

const interceptors = [
  {provide: HTTP_INTERCEPTORS, useClass:MultitenantInterceptor, multi:true}
]

Add the module to the imports, supply the config to the module

import:[
    ...
    MultiTenantModule.forRoot(multitenantConfig)
    ...
]

Add interceptors to the providers list of the module

    providers: [
        ....
        interceptors
        .....
  ]

To get the tenant selector component you can add

<tenant-selector><tenant-selector>
1.2.6

4 years ago

1.2.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago