Since other packages might potentially use this same JavaScript file, I wonder if there might be some way to only include that if isn't already included by another package.
Just found it strange that I had to do this because it's included in the Umbraco release.
I also had other problems including the ngResource module but finally found a way if anyone else are having problems with the module.
var app = angular.module("umbraco");
//Only need to inject/requires the ngResource module once
//As when done all other controllers will have access to it
app.requires.push('ngResource');
angular.module("umbraco.resources")
.constant("appSettings",
{
serverPath: "backoffice/Caddie/ResultTree"
});
ngResource problem
Hi I'm trying to develop a custom section where I use Angular. I would like to use ngResource but if I include it I get
No module: ngResource
The only angular I have included is this
Do I have to load angular-resources.js or is something else wrong here ?.
/Paul S
Yes, it looks like ngResource requires a second script file to be included in order to use it: https://docs.angularjs.org/api/ngResource
You can do that in the package manifest for your custom section: http://umbraco.github.io/Belle/#/tutorials/manifest
Since other packages might potentially use this same JavaScript file, I wonder if there might be some way to only include that if isn't already included by another package.
Hi Thansk for tha answer
Just found it strange that I had to do this because it's included in the Umbraco release.
I also had other problems including the ngResource module but finally found a way if anyone else are having problems with the module.
/Paul S
is working on a reply...