I have added ngDialog to my angularjs app, and upon injecting it to my module this is what I got:
Uncaught Error: Mismatched anonymous define() module: function (a){"use strict";var b=a.module("ngDialog",[]),c=a.element,d=a.isDefined,e=(document.body||document.documentElement).style,f=d(e.animation)||d(e.WebkitAnimation)||d(e.MozAnimation)||d(e.MsAnimation)||d(e.OAnimation),g="animationend webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend",h="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",i=!1,j={},k=[],l=!1;return b.provider("ngDialog",function(){var b=this.defaults={className:"ngdialog-theme-default",plain:!1,showClose:!0,closeByDocument:!0,closeByEscape:!0,closeByNavigation:!1,appendTo:!1,preCloseCallback:!1,overlay:!0,cache:!0,trapFocus:!0,preserveFocus:!0,ariaAuto:!0,ariaRole:null,ariaLabelledById:null,ariaLabelledBySelec
What is the reason of this error? Do I have to modify the ngDialog.js code?
Added info : injecting in module.js :
var app = angular.module('myApp', ['...', ...., 'ngDialog']);
*** when I inject ngdialog in my controller like this :
app.controller('myController', ['$scope','$http','ngDialog', function ($scope,$http,ngDialog) { ...
this is the error I get :
Error: [$injector:unpr] Unknown provider: ngDialogProvider <- ngDialog <- inventoryController