I've been utilizing the golden layout in conjunction with Angular 6, following the steps outlined in this particular guide.
The issue arises when I try to execute
GoldenLayoutModule.forRoot(config)
The error message states that 'config' is not compatible with the type parameter
GoldenLayoutConfiguration
.
import { AppComponent } from './app.component';
import { GoldenLayoutModule, GoldenLayoutConfiguration } from '@embedded-enterprises/ng6-golden-layout';
import * as $ from 'jquery';
// jQuery must be global within the window object.
window['$'] = $;
// const config: GoldenLayoutConfiguration { /* Incomplete */ };
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: [],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }