0

I'm building a SPA with Angularjs and Wijmo 5.

I've inserted a Wijmo FlexGrid inside a partial file, then I've included it to the parent page using ng-include. The parent page is also an partial file: it's inside the ng-view.

<wj-flex-grid id="myFlexGrid"
              control="myFlexGrid"></wj-flex-grid>

The problem is that I can't reach the FlexGrid control. When i try to declare the flex control, it throws a error: Cannot read property 'selection' of undefined.

var flex = $scope.myFlexGrid;
var myVar = flex.selection;

How can I reach the FlexGrid control?

Cappa
  • 107
  • 1
  • 6

1 Answers1

0

ng-include creates a child scope so any directive used within it will be on child scope. You should create flex grid like this -

<wj-flex-grid id="myFlexGrid" control="file.myFlexGrid" items-source="file.data" loaded-rows="loadedRows()">
</wj-flex-grid>

Here is working fiddle.

Shashank Trivedi
  • 232
  • 2
  • 16