I'm trying to figure out how I can present a bootstrap modal dialog from my Angular controller. Basically what I have is a table. When the user clicks on a table row I want to present a modal dialog that contains details about the selected row.
The way I'm thinking about approaching this is have each table row respond to an ng-click. The ng-click will call a function in the controller and this function will present the modal dialog as well as pass it the data it needs to display.
I know how to display a modal dialog from the view itself, but I'm not sure how I can trigger the modal from the controller. Any ideas?
The controller, for the view, has the following function which will be called when the user selects a row to view a modal dialog.
$scope.rowClicked = function(rowID){ $scope.dataForModal = Data.get(rowID, function(err,data){ //Here is where I'd like to display the modal dialog in the view }); }