Unfortunately, I encountered a problem with the prompt dialog in my Yo Angular fullstack application.
After researching a solution online, I followed advice to update my Angular version. However, this did not resolve the issue.
$scope.showPrompt = function(ev, ret, value) {
var confirm = $mdDialog.prompt()
.title('Edit ' + value)
.textContent('Enter a new value for: ' + value)
.placeholder('getValue()')
.ariaLabel('New ' + value)
.targetEvent(ev)
.ok('Accept')
.cancel('Cancel');
$mdDialog.show(confirm).then(function(result) {
//setValue(result);
});
};
Every time I attempt to use the function, I encounter an error stating TypeError: $mdDialog.prompt is not a function.
If I modify the dialog to a .confirm and remove the placeholder, it functions correctly.