I've started playing around with Angular and extending the backend.
My first attempt is a Google Map data type, where I type in an address and the marker pops up. Inspired by this tutorial: http://www.netaddicts.be/umbraco/enabling-google-maps-in-v7/ ( Awesome tutorial - really helped me alot, on getting started :)
And now to my problem - I want to attach an id to my input field, where I use the {{model.alias}} to get a unique id in case of my property editor should be used multiple times on same node.
But I can't seem to parse my {{model.alias}} to my function in my controller - it just returns "undefined".
But to help with debugging I found this useful to use console.log console.log("Model Value", $scope.model.value); to push stuff to the browser console for debugging alot, or to keep an eye on the main model object I have a textarea like so in my editor/view.
Angular calling a function with parameter
I've started playing around with Angular and extending the backend.
My first attempt is a Google Map data type, where I type in an address and the marker pops up. Inspired by this tutorial: http://www.netaddicts.be/umbraco/enabling-google-maps-in-v7/ ( Awesome tutorial - really helped me alot, on getting started :)
And now to my problem - I want to attach an id to my input field, where I use the {{model.alias}} to get a unique id in case of my property editor should be used multiple times on same node.
But I can't seem to parse my {{model.alias}} to my function in my controller - it just returns "undefined".
My view:
Now I have my function in my controller:
Any help would be very appreciated :)
-Kim
Hi Kim,
I just tested this and this should work.
What results do you get when you add an alert with the value in your controlller.
Dave
Hi Kim, Like Dave as suggested this value should be working for you.
You could do this in your controller like so:
And then in your view it could be like so:
But to help with debugging I found this useful to use console.log console.log("Model Value", $scope.model.value); to push stuff to the browser console for debugging alot, or to keep an eye on the main model object I have a textarea like so in my editor/view.
I hope this helps
Warren
When I finaly got the cached cleared - my problem was solved.
But thanks a million for your reponses.
I have my cache disabled in the chrome developer tools. Saves a lot of time refreshing it.
Dave
is working on a reply...