I'm trying to get material angular's dialog wired up. Code below. I get error, Unknown provider: eProvider <- e
.
Js
var app = angular.module('app', ['ngMaterial']);
var dialogController = app.controller('dialogController', ['$scope', '$mdDialog', function($scope, $mdDialog) {
$scope.hide = function () {
$mdDialog.hide();
};
$scope.cancel = function () {
$mdDialog.cancel();
};
$scope.answer = function (answer) {
$mdDialog.hide(answer);
};
}]);
app.controller('mainController', ['$scope', '$http', '$mdDialog', function ($scope, $http, $mdDialog) {
$scope.showDialog = function (e) {
e.preventDefault();
$mdDialog.show({
controller: dialogController,
templateUrl: 'sign-in.html',
targetEvent: e
});
};
}]);
Html
<a href="#" ng-click="showDialog($event)">Show dialog</a>
<script type="text/ng-template" id="sign-in.html">
hello there
</script>
Am I missing anything?