0

I need to close the browser window where My angular application opened curently when a button is clicked in UI. I am using $window.close() on the button click but getting error "Scripts may close only the windows that were opened by it". how to implement this in angularJS.

Amit
  • 27
  • 1
  • 9
  • Welcome to Stack Overflow! Please visit the [help], take the [tour] to see what and [ask]. Do some research, search for related topics on SO; if you get stuck, post a [mcve] of your attempt, noting input and expected output. – mplungjan Jul 23 '18 at 13:02
  • Well ... the Error kind of says it all. You cannot close a window that you didn't open yourself. – Jens Habegger Jul 23 '18 at 13:03
  • What is the usecase? can you please post the code you have tried so far? – messerbill Jul 23 '18 at 13:04
  • usecase is upon clicking a button from UI current browser window should be closed. I tried $window.close() and self.close() options which are working fine in IE but not working in chrome – Amit Jul 30 '18 at 06:52

0 Answers0