dependencies dependencies cluster_ReportMetaStoreModule cluster_ReportMetaStoreModule_imports cluster_ReportMetaStoreModule_providers cluster_ReportMetaStoreModule_declarations cluster_ReportMetaStoreModule_exports ReportMetaStorePage ReportMetaStorePage ReportMetaStoreModule ReportMetaStoreModule ReportMetaStorePage->ReportMetaStoreModule MetaStoreModule MetaStoreModule ReportMetaStoreModule->MetaStoreModule ReportMetaStorePage ReportMetaStorePage ReportMetaStoreModule->ReportMetaStorePage MetaStoreModule MetaStoreModule MetaStoreModule->ReportMetaStoreModule SharedModule SharedModule SharedModule->ReportMetaStoreModule TranslationsModule TranslationsModule TranslationsModule->ReportMetaStoreModule ReportMetaStore ReportMetaStore ReportMetaStore->ReportMetaStoreModule

File

lib/features/src/reports/meta-store/report-meta-store.module.ts

Methods

Static forChild
forChild(stores?: Type[], metaActions?: MetaAction[])
Parameters :
Name Type Optional
stores Type<ReportStore>[] Yes
metaActions MetaAction<ReportConfig, Report, ReportStore>[] Yes
import 	{
			NgModule,
			ModuleWithProviders,
			Type
		} 									from '@angular/core'

import 	{ 	RouterModule 			}		from '@angular/router'

import	{
			BaseMetaStoreModule,
			MetaAction,
			MetaStoreModule,
			provideItemRepresentation,
			provideMainMenuEntry,
			SharedModule,
			TranslationsModule,
            PathAction
		}									from '@rcc/common'

import	{
			Report,
			ReportConfig,
			ReportStore,
		}									from '@rcc/core'


import	{	ReportMetaStore		}			from './report-meta-store.service'

import	{
			REPORT_STORES,
			REPORT_META_ACTIONS,
			ReportHomePath
		}									from './report-meta-store.commons'

import	{	ReportMetaStorePage 	}		from './overview-page/overview-page.component'



import en from './i18n/en.json'
import de from './i18n/de.json'



const routes 				=	[
									{ path: ReportHomePath,	component: ReportMetaStorePage	},
								]

const metaStoreConfig 		=	{
									itemClass:			Report,
									serviceClass:		ReportMetaStore
								}


export class MenuEntryReportMetaStore {}

const menuEntry: PathAction   =   {
    position: -3,
    path: ReportHomePath,
    label: 'REPORT_META_STORE.MENU_ENTRY',
    icon: 'report',
}


@NgModule({
	imports: [
		SharedModule,
		RouterModule.forChild(routes),
		MetaStoreModule.forChild(metaStoreConfig),
		TranslationsModule.forChild("REPORT_META_STORE", {en,de}),
	],
	declarations: [
		ReportMetaStorePage,
	],
	providers:[
		ReportMetaStore,
		provideMainMenuEntry(menuEntry),
	],
	exports: [
		ReportMetaStorePage,
		MetaStoreModule					//this is important so anything importing ReportMetaStoreModule can use the componets of MetaStoreModule too
	]
})
export class ReportMetaStoreModule extends BaseMetaStoreModule {

	static 	forChild(
				stores?			: Type<ReportStore>[],
				metaActions?	: MetaAction<ReportConfig, Report, ReportStore>[]
			): ModuleWithProviders<ReportMetaStoreModule> {

		const mwp = BaseMetaStoreModule.getModuleWithProviders<ReportMetaStoreModule>(this, stores, metaActions, REPORT_STORES, REPORT_META_ACTIONS)
		return mwp
	}

}

results matching ""

    No results matching ""