Grid not initialized on AngularJS


#1

Hello

I just trying using Grid v6 and trying to use it on angularJS
my code is quite simple, the controller contain something like this

$http.get('/dummy_data/dataset.json').then(function(res){
            var testGrid = new dhx.Grid("grid_container", {
                columns: [
                    { width: 100, id: "a", header: [{ text: "#" }] },
                    { width: 100, id: "b", header: [{ text: "Title" }] },
                    { width: 200, id: "c", header: [{ text: "Name" }] },
                    { width: 200, id: "d", header: [{ text: "Address" }] }
                ],
                headerRowHeight: 50
            });
            
            console.log(testGrid);
        });

And in the html i also make a div with id grid_container

but the Grid is not showing up, and the html is not changing
Any one here can give me some advise ? thankyou


#2

seems like you have not loaded your dataset to your grid.
If the problem still occurs for you could you please, provide a complete demo, where the problem can be checked locally.