I am trying to open a modal on click of a button with Angular. On the function called on btn click I am having the code mentioned below:
function openAddVideoModal() {
var modalInstance = $mdDialog.show({
templateUrl: 'createDesign.html',
controller: 'createDesignCtrl',
resolve: {
currentUser: function () {
return _this.currentUser;
},
postOptions: function() {
return {"receiverId":0};
}
},
parent: angular.element(document.body),
clickOutsideToClose:true,
fullscreen: false
});
}
Though, when i click on the button, i receive this error message:
TypeError: $mdDialog.show is not a function
Can anyone please help? Thank you in advance.
$mdDialogin your controller function?