-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access sub-attribute via dot notation ("address.street") #525
Labels
Comments
I think this is what you are looking for: app.config(function(RestangularProvider) {
RestangularProvider.addElementTransformer('books', function(element) {
for (var key in element.values) {
element[key] = element.values[key];
}
return element;
});
}); I copy paste this from the documentation |
Indeed, we can do it currently the way @karantan suggested. ng-admin doesn't support the dot notation. But that's indeed a good idea. I keep the issue opened to not forget it. :) |
Good news: that's now possible in the master branch, thanks to #549 being merged. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
my API returns data in the format (extract only):
How can I access for instance the
street
attribute? It would be nice, if I could access it directly bynga.field('address.street')
, but that does not seems to work. Of course I could define the field astemplate
field and write a directive. But when I've many of such fields, that would not be so nice. Or is there another, simple way?The text was updated successfully, but these errors were encountered: