I am incorporating HTML from the AngularJS controller and showcasing this content in Bootstraps $uibModal
as shown below:
$scope.phoneNumber = '0111111111';
var modalInstance = $uibModal.open({
template: '<div class="modal-header d-flex flex-column align-items-center justify-content-center">\
<p class="font-h3 font-weight-medium">Please contact us on {{phoneNumber}}</p>
</div>',
appendTo: undefined,
controllerAs: '$ctrl',
controller: ['$uibModalInstance', '$timeout', '$state', function($uibModalInstance, $timeout, $state){
//LOGIC GOES HERE
}]
});
Even though the modal appears correctly, the dynamic expressions are not being evaluated.
Query
How can I ensure that the expression is evaluated in the controller before it is displayed to the user?