Merge pull request #6989 from abpframework/testing/6967

Angular UI: Added ThemeBasicTestingModule and secondary entry point for it
pull/6990/head
Bunyamin Coskuner 5 years ago committed by GitHub
commit d059c82a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,6 +49,12 @@ export const LAYOUTS = [ApplicationLayoutComponent, AccountLayoutComponent, Empt
],
entryComponents: [...LAYOUTS, ValidationErrorComponent, CurrentUserComponent, LanguagesComponent],
})
export class BaseThemeBasicModule {}
@NgModule({
exports: [BaseThemeBasicModule],
imports: [BaseThemeBasicModule],
})
export class ThemeBasicModule {
static forRoot(): ModuleWithProviders<ThemeBasicModule> {
return {

@ -0,0 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/theme-basic/testing",
"lib": {
"entryFile": "src/public-api.ts"
}
}

@ -0,0 +1,32 @@
import {
BaseThemeBasicModule,
BASIC_THEME_NAV_ITEM_PROVIDERS,
BASIC_THEME_STYLES_PROVIDERS,
ValidationErrorComponent,
} from '@abp/ng.theme.basic';
import { ModuleWithProviders, NgModule } from '@angular/core';
import { VALIDATION_ERROR_TEMPLATE, VALIDATION_TARGET_SELECTOR } from '@ngx-validate/core';
@NgModule({
exports: [BaseThemeBasicModule],
imports: [BaseThemeBasicModule],
})
export class ThemeBasicTestingModule {
static forRoot(): ModuleWithProviders<ThemeBasicTestingModule> {
return {
ngModule: ThemeBasicTestingModule,
providers: [
BASIC_THEME_NAV_ITEM_PROVIDERS,
BASIC_THEME_STYLES_PROVIDERS,
{
provide: VALIDATION_ERROR_TEMPLATE,
useValue: ValidationErrorComponent,
},
{
provide: VALIDATION_TARGET_SELECTOR,
useValue: '.form-group',
},
],
};
}
}

@ -0,0 +1 @@
export * from './lib/theme-basic-testing.module';
Loading…
Cancel
Save