Create a button in html file and write a specific function in javascript file to perform your business logic. An sample example as shown below:
HTML file:
<button type="button" class="btn btn-default" ng-click="showError()">Create</button>
Javascript file:
var data = {"err_data" : {"title": "Error","showClose": "true","closeBtnTxt": "Ok","icon": "glyphicon glyphicon-exclamation-sign","iconColor": "icon_error","msg":"<>","buttons": []}};
$scope.showError = function() {
dialog_tpl = $(modelTemplate).filter('#personDialog').html();
var html = Mustache.to_html(dialog_tpl, data.err_data);
$(html).modal({backdrop: "static"});//backdrop: "static" - for grayed out and no outside click work, backdrop: false - no grayed out*!
}