I'm getting the following error when trying to load a modal in my app.
angular.js:13236 Error: [$injector:unpr] http://errors.angularjs.org/1.5.0/$in...
at Error (native)
at https://appery.io/app/view/db9e0dc0-a...
at https://appery.io/app/view/db9e0dc0-a...
at Object.d [as get] (https://appery.io/app/view/db9e0dc0-a...)
at https://appery.io/app/view/db9e0dc0-a...
at Object.d [as get] (https://appery.io/app/view/db9e0dc0-a...)
at A.get (https://appery.io/app/view/db9e0dc0-a...)
at Object. (https://appery.io/app/view/db9e0dc0-a...)
at Object.invoke (https://appery.io/app/view/db9e0dc0-a...)
at Object.$get (https://appery.io/app/view/db9e0dc0-a...)
I have another app that works fine. I did notice that the working app uses Libraries version v1.0 and the error app uses Libraries version v1.1.
The modal is created and listed under Modals.
Here's my code:
Apperyio.get('Modals').loadModal("Indemnity").then(
function(modal){
modal.scope.current_item = {
// Set input object for send to modal window
// Value: .itemFromModal
};
modal.scope.modalInstance = modal.open({
// Optional settings:
size: 'lg', /* 'lg' | 'sm' /
backdrop: true, / true | false | 'static' /
keyboard: true, / true | false /
backdropClass: '', / backdropClass name /
windowClass: '', / additional CSS class(es) to be added to a modal window template /
windowTemplateUrl: '' / a path to a template overriding modal's window template */
});
modal.scope.modalInstance.result.then(
function(current_item){
// Custom implementation with modal response with current_item
},
function(error){
console.log(error);
}
);
});