I have a jsp file which is getting data from OSGi configuration in AEM, like below
<c:set var="myParam" value="${myConfig.myParam}" scope="request"/>
Now in my JS file, I am initalising my angular app like below:
var app = angular.module('myapp', []);
app.provider("$provider1", [function () {
// Default configuration
var config = {
key1: 'value'
};
return {
configure: function (params) {
angular.extend(config, params);
},
$get: ['$rootScope', function ($rootScope) {
return {
config: config
};
}]
};
}]);
app.config(['$authProvider', function($authProvider) {
$authProvider.configure({
key1: 'myCustomDataFromJSP'
})
}]);
How can I retrieve this myCustomDataFromJSP
from my JSP file? In config phase we can't access scope.
Thanks