I'm trying to get a modal to appear using Angular-UI v0.10.0 (http://angular-ui.github.io/bootstrap/) and Angular 1.1.5 and I receive the following error:
Error: $modal.open is not a function
I'm not sure or why I'm getting this error. Here's what I have...
HTML:
<div ng-controller="ModalDemoCtrl">
<button class="btn btn-default btn-sm" ng-click="open()">open me</button>
</div>
JS:
app.controller('ModalDemoCtrl', ['$scope', '$modal', function ($scope, $modal) {
$scope.open = function () {
var modalInstance = $modal.open({
templateUrl: 'template.html',
controller: 'ModalInstanceCtrl',
resolve: {}
});
};
}]);
app.controller('ModalInstanceCtrl', ['$scope', '$modalInstance', function ($scope, $modalInstance) {
$scope.ok = function () {
$modalInstance.close();
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
}]);
I'm just trying to get the basics down first...like getting it to open. I've pretty much exhausted me resources, so any help would be greatly appreciated! Thanks!