Adjusting datatable size when resizing window with angular

Hi,

I’ve followed the documentation to init a datatable with angular and it works fine :

in my controller.js I have:
$scope.config = {
view:“datatable”,
id:“admintable”,

}

Now I would like to adjust its size when the window is resized.

In the documentation there’s an example to do that but it’s not done in the angular way:
webix.event(window, “resize”, function(){ grid.adjust(); })

I’ve tried to do the same thing but I replaced “grid” by $$(“admintable”).adjust(), but that doesn’t work.
I debugged it and it seems the function is never called

Any idea how I could do that?

The code looks fine

webix.event(window, "resize", function(){ $$("admintable").adjust(); })

this line will resize grid after window resize. Just be sure that grid’s container has not fixed sizes ( it must have percent of auto size set ), as adjust command will adjust component to the size of its container, but will not resize container itself.