I have created a macro using AngularJS and have my own Controller.
I would like to somehow extend the $scope.saveAndPublish function from umbraco.controller.js file so when a user publishes a page my code runs too.
Is this possible? I dont really want to hack into the umbraco.controller.js code as the next time there is an Umbraco update this code will need to be readded.
not sure if that is really a good idea.
Think something like that can be done with interceptors. But not tried it myself so not really an example at hand.
Extend the performSave function in AngularJs
Hi,
I have created a macro using AngularJS and have my own Controller.
I would like to somehow extend the $scope.saveAndPublish function from umbraco.controller.js file so when a user publishes a page my code runs too.
Is this possible? I dont really want to hack into the umbraco.controller.js code as the next time there is an Umbraco update this code will need to be readded.
Thanks Jon
Hi Jonathan,
not sure if that is really a good idea. Think something like that can be done with interceptors. But not tried it myself so not really an example at hand.
Regards David
Cool - I have looked into Interceptors and it looks good - just wondering if it is possible to get the Controller scope in the Interceptor?
Hi Jonathan,
not sure as I haven't done it myself. :) Maybe someone else has an idea.
Regards David
is working on a reply...