First, the user will be asked to ask if they want to close the browser:
$window.close()
You want to enter the $window service in your controller / service. You can also use the javascript window global variable directly, but I prefer to use its "angular" and use only injective tools.
source share