I have a project in Grails 2.4.4 in which I also use AngularJS.
I've decided to use the Asset Pipeline Plugin along with AngularJs Annotate Asset-Pipeline. The first one for processing, minifying, etc the static assets(js,css, etc) and the second one for getting the
myFunc.$inject = [...]
myFunc.$inject=[]
$inject
compile "org.grails.plugins:asset-pipeline:1.9.9"
compile "org.grails.plugins:angular-annotate-asset-pipeline:2.4.1"
angular
.module('app', [])
.controller('myCtrl', myCtrl);
/*@ngInject*/ // << --- did not work!
function myCtrl ($scope){
//I also used the "ngIngect"; alternative here and it did not work either!
$scope.myVar = "sample text";
}
Short answer:
Change the version of the dependency
form this:
compile "org.grails.plugins:angular-annotate-asset-pipeline:2.4.1"
to this:
compile "org.grails.plugins:angular-annotate-asset-pipeline:1.1.3"
Long story
After digging into the AngularJs Annotate Asset-Pipeline, and with the help provided by a friend I came to the conclusion that the author of this plugin just removed the logic inside it.
This means that right now (May 25th, 20017) with the current version of this plugin (2.4.1) nobody will be able to use it as it was intended to be used.
So, if anybody is experiencing this same issue should use instead version 1.1.3 which is the latest I was able to use successfully.