5

So when I click the button, my whole browser window goes black and there isn't any popup showing up. When I inspect element. I can see the outline of the pop up when my mouse hover overs it but the content is not there.

app.controller('HomeController', function($scope, $timeout, mapboxService, $mdDialog) {
   $scope.showAdvanced = function(ev){
    $mdDialog.show({
        controller: DialogController,
        templateUrl: 'views/reviewForm.html',
        parent:angular.element(document.body),
        targetEvent: ev,
        clickOutsideToClose:true
    })
};
});

html

<div id="popupContainer">
   <md-button ng-click="showAdvanced($event)" flex="100">Add a Review</md-button>
 </div>

reviewForm html

<md-dialog>
<md-dialog-content>

    <h1>;lkasdjf;lkasdjf;lkajsdf;lkajdf</h1>

</md-dialog-content>
</md-dialog>
Zach Turner
  • 55
  • 1
  • 5
  • Cannot reproduce it given what you've shown above ~ http://plnkr.co/edit/m9slJdMh5hiBYKBvwQth?p=preview. There must be something else causing the problem, maybe your CSS? – Phil Oct 29 '15 at 00:46

1 Answers1

1

you have to define DialogController.

add this to your code:

function DialogController($scope, $mdDialog) {

//whatever functions you want to define

}
Mohamed dev
  • 172
  • 1
  • 8