Golden layout popouts with AngularJS

833 Views Asked by At

I am using golden layout in single page application. Golden layout normal 'open in new window' works pretty well (https://jsfiddle.net/shafaq_kazmi/xs5r6mma/6/)

var myLayout = new GoldenLayout({
  content: []
}, $('#layoutContainer'));

myLayout.registerComponent('example', function(container, state) {
  container.getElement().html('<h2>Hello World</h2>');
});

myLayout.createDragSource($("#button"), {
  type: 'component',
  componentName: 'example',
  componentState: {
    text: 'Button'
  }
});
myLayout.init();

But when I am trying to integrate it in SPA, when I popout any widget, the whole application gets loaded in popup window instead of the particular widget. Do I need to have some specific configurations to fix this behavior? How can I achieve the actual popout feature.

Any help on this?

1

There are 1 best solutions below

0
On

Here is PR which fixed the issue with GL when used with SPA. Use latest js from github and try again

https://github.com/deepstreamIO/golden-layout/pull/152