这两个功能是否相同? (见最后的括号)
<div ng-prevent-navigation="vm.pageShouldBeReloaded"
ng-prevent-navigation-text="Payment form has unsaved changes.
If you leave the page now you will lose those changes."
></div>
和
(function () {
alert('hi');
}());