I am new to angular. I have create a modal using angular ui.bootstrap. I have an anchor tag with external link. If i click on anchor tag, the new window is not opening. any preventDefault is applied on modal ?
$uibModalInstance = $uibModal.open({
animation: true,
template: '<div class="modal-header "><h3 class="modal-title">{{modalTitle}}<a href="javascript:void(0);" class="icon icon-page_close_grey" ng-click="cancel()"></a></h3></div>' +
'<div class="modal-body">' + data + '</div><div class="modal-footer"></div>',
size: 'lg',
backdrop:'static',
controller: modalcontroller
});
Here my data is contains a tag with href="http://www.google.com" , target="_blank". Can any one help out
Try this way:
Angular will ignore elements with
ng-non-bindable
attribute, so anchor tag will behave as plain html tag.