I am having one div for dialog box in the html and I want that dialog box should open when the function in the controller is called.
This is my div which the function should open.
<div id="example" role="dialog" class="modal fade"
style="top: 80px;left: 370px;right: 20px;width: 500px;
height: 600px;margin: 0;overflow: auto;">
<h6>some text</h6>
</div>
This is my function in the controller.
NumberService.getNumberList(result.auth_token).then(function(result){
if(result.status == "success"){
$scope.data = result.data;
var Home= document.getElementById("example");
Home.style.display="";
}else{
$scope.status = result.status;
}
});
I have used document.getElementByID but its not working. How to solve this problem?