Do you have any examples of using this from within another modal? I'm still new to angular, so I may be missing something quite simple, but I'm getting an injection error after following your example.
I have a view that itself will open a modal to allow for data entry. It's a pretty standard setup... form fields, and clicking okay will save the information. Cancel will cancel everything.
There's set of fields that dynamically repeat and they each have a button that will delete a set, if needed. In that function, I'm using the service method of calling your plugin.
I've included the reference in my controller like your example says.
And then I included the confirm within the OK click function.
$scope.RemoveSession = function (session) {
if (session.SessionId > 0 || (session.Title.length > 0 || session.Description.length > 0)) {
$confirm({ text: 'Are you sure you want to delete this session?' })
.then(function () {
if (session.SessionId > 0) {
// call a web service to delete the session server-side
}
return;
});
}
var index = $scope.sessions.indexOf(session);
$scope.sessions.splice(index, 1);
}
But I get this error when I click on the button to open the original (my) modal:
Do you have any examples of using this from within another modal? I'm still new to angular, so I may be missing something quite simple, but I'm getting an injection error after following your example.
I have a view that itself will open a modal to allow for data entry. It's a pretty standard setup... form fields, and clicking okay will save the information. Cancel will cancel everything.
There's set of fields that dynamically repeat and they each have a button that will delete a set, if needed. In that function, I'm using the service method of calling your plugin.
I've included the reference in my controller like your example says.
And then I included the confirm within the OK click function.
But I get this error when I click on the button to open the original (my) modal:
Error: [$injector:unpr] Unknown provider: $confirmProvider <- $confirm <- AddSpeakerModalController
Can you help me?