If user tries to leave unsaved edited form, a message box pop-up
“This page is asking you to confirm that you want to leave – data you have entered may not be saved.
Leave Page and Stay on Page”
Can we invoke this confirmation box through some special function of browser? I want to implement it in AngularJS application

Warlock’s answer is partly right, but in doing so, you’d break testability.
In Angular, you’d want to use $window, and you’ll want to watch
$dirtyon your form. You’ll need to have a named form, noticename="myForm"below. Then you can$watch$dirtyon the form in your$scope:HTML
Here’s a plunk to demonstrate: http://plnkr.co/edit/3NHpU1