I am creating my own property editor and here i can show in a list all the items i have and send a link and so on, but on my document type i have a disabled option, i would like to grey out the text if disabled is set to true, is there a way to get hold of a property value in angular ?
It largely depends on how you are building your list of items ?
If you are returning JSON from an API controller then add the disabled value to the returned JSON, and use it's value to set the text as disabled or not.
Otherwise within your Angular property editor if you are using the entityResource then you will only have access to basic entity properties, eg Name, Id, etc
and to retrieve properties you can do content.propertyName
P.S. dont use alert(JSON.Stringify(content)) since for some reason it will only return parts of the first tab use the console.log instead that also styles i nicely for you in the process
GetPropertyValue in Angular
I am creating my own property editor and here i can show in a list all the items i have and send a link and so on, but on my document type i have a disabled option, i would like to grey out the text if disabled is set to true, is there a way to get hold of a property value in angular ?
Hi Casper
It largely depends on how you are building your list of items ?
If you are returning JSON from an API controller then add the disabled value to the returned JSON, and use it's value to set the text as disabled or not.
Otherwise within your Angular property editor if you are using the entityResource then you will only have access to basic entity properties, eg Name, Id, etc
http://umbraco.github.io/Belle/#/api/umbraco.resources.entityResource
the above suggests using the contentResource instead to retrieve all properties:
http://umbraco.github.io/Belle/#/api/umbraco.resources.contentResource
Thanks i figured it out
i dit it like this.
i injected the contentResource into my angular controller. Then i used this piece of code.
and to retrieve properties you can do content.propertyName
P.S. dont use alert(JSON.Stringify(content)) since for some reason it will only return parts of the first tab use the console.log instead that also styles i nicely for you in the process
is working on a reply...