custom view for blocklist with angular controller ...
# help-with-umbraco
m
I tried the example code from https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/build-custom-view-for-blocks#id-2.-retrieve-the-image-using-an-angularjs-controller in a custom view for a blocklist item that contained an image. It does not seem to update at all and only works when the document is loaded or saved, not when the blocklist item editor flyout is submitted. My angular knowledge is slim, but I can confirm that the code works when the documented is loaded, just not when it's updated. AFAIK I have used the code as-is without changes. On umbraco v13.2 Thanks.
Got it (I think). I need to do a $scope.$watch on the value. This something I feel the umbraco docs could have included, because as it stands, the example shown doesn't actually work.
l
@mcgern you’re correct, do you have this working? If not, I can get you a code sample of how I have this working?
m
@Lewis Heaton Yeah I got it working by putting the $watch in place. Thanks for the offer
33 Views