first working version of dynamic load
This commit is contained in:
@@ -22,6 +22,7 @@ export default {
|
||||
external: [
|
||||
'plugins-core',
|
||||
'@angular/core',
|
||||
'@angular/common'
|
||||
'@angular/common',
|
||||
'@angular/router'
|
||||
]
|
||||
}
|
||||
@@ -2,9 +2,12 @@ import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { PluginComponent } from './component';
|
||||
import { ANestedComponent } from './a-nested.component';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { FrontendPlugin, SidebarEntry } from 'frontblock-generic/Plugin';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule],
|
||||
imports: [CommonModule, RouterModule.forChild([{path: "pluginmanager", component: PluginComponent}])],
|
||||
exports: [RouterModule],
|
||||
declarations: [
|
||||
PluginComponent,
|
||||
ANestedComponent
|
||||
@@ -15,4 +18,9 @@ import { ANestedComponent } from './a-nested.component';
|
||||
useValue: PluginComponent
|
||||
}]
|
||||
})
|
||||
export class PluginModule { }
|
||||
export class PluginModule implements FrontendPlugin{
|
||||
getSidebarEntry(): SidebarEntry {
|
||||
return {icon: 'check', text: 'Plugin manager', route: 'pluginmanager'}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user