html - How to add a close button to a newly opened window in ionic for an android device? -


i have code this:

$scope.vieworderdetails = function vieworderdetails(detail) {     var newwin = open('orderdetails.html','windowname','height=300,width=300');     newwin.document.write('html write...');     newwin.document.write(detail);     //<input type="button" value="close window" onclick="self.close()"> } 

i want add close button newwin. how can achieve that? thanks.

updated:

newwin.document.write('<input type="button" value="close window" onclick="window.close()">'); 

it works in ionic serve, when running in pad device, when click "close window", window can not closed.

the answer in question itself...you can try this...

newwin.document.write('<input type="button" value="close window" onclick="window.close()">');


Comments

Popular posts from this blog

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -