I am using golden layout with Angular 6, following this tutorial.
I'm getting an error on GoldenLayoutModule.forRoot(config)
config not assignable to parameter of type
GoldenLayoutConfiguration
.
import { AppComponent } from './app.component';
import { GoldenLayoutModule, GoldenLayoutConfiguration } from '@embedded-enterprises/ng6-golden-layout';
import * as $ from 'jquery';
// It is required to have JQuery as global in the window object.
window['$'] = $;
// const config: GoldenLayoutConfiguration { /* TODO */ };
let config = {
content: [{
type: 'row',
content:[{
type: 'component',
componentName: 'testComponent',
componentState: { label: 'A' }
},{
type: 'column',
content:[{
type: 'component',
componentName: 'testComponent',
componentState: { label: 'B' }
},{
type: 'component',
componentName: 'testComponent',
componentState: { label: 'C' }
}]
}]
}]
};
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
GoldenLayoutModule.forRoot(config)
],
entryComponents: [
// TODO Add your components which are used as panels in golden-layout also here.
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }