Then injected the dataTypeResource module and used its "getById" method to return an object containing data for this data type. However, the object returned not what I'm looking for, as when I call the grid it falls over in umbraco.controller.js on the following line:
The UpdateGridEditors function is not comlpete as I'm doing some fetching of saved content and so on there. But thats not relevant for getting the idea.
Render Grid in Custom Section
Hi
I've been having trouble rendering a custom grid data type, which is within a custom section, using Angular in the backoffice.
I've managed to use the following to get the id of the data type in a controller:
Then injected the dataTypeResource module and used its "getById" method to return an object containing data for this data type. However, the object returned not what I'm looking for, as when I call the grid it falls over in umbraco.controller.js on the following line:
This is due to the object/model not containing "items".
Below is the search, and setting the scope object:
I've got a feeling I'm doing something very wrong here.
I'd really appreciate it if anyone could guide me in the right direction.
Thanks.
Hi Alex,
I'm doing it like this:
First I created a new Api Controller responsible for getting me the property editor data:
As you can see it fetches the data based on a name. Think you can change that for using an id instead.
Then I created a resource witch fetches the configuration from the api controller:
});
The view renders the editor like this:
The controller builds up the stuff for the view like:
The UpdateGridEditors function is not comlpete as I'm doing some fetching of saved content and so on there. But thats not relevant for getting the idea.
Hope that helps.
Regards David
Hi David
Pretty much what I'm looking for, thanks for the help!
is working on a reply...