2

I know that $window.open() opens a new tab with the url specified but is there a way to open a new Window? Did some digging around and couldn't find anything.

6
  • 2
    Whether a tab or a window opens is up to the browser (or the user's preferences). Commented Sep 9, 2014 at 20:47
  • It's actually not, I figured out how to open a tab AND/OR a window. To open a tab, you'd use $window.open(url). To open a new window, you'd use $window.open(url, window name, attribute, attribute). Commented Sep 9, 2014 at 21:26
  • 1
    Don't force me to open a new window. Commented Sep 9, 2014 at 21:39
  • Blackhole, totally understand the article and i agree with it to the fullest extent but unfortunately the assignment is to "open a new window" and not a tab. Great advice though thank you Commented Sep 9, 2014 at 22:47
  • I stand corrected. I wonder, though, whether the assignment author intended to be so explicit. Commented Sep 10, 2014 at 13:36

1 Answer 1

4

When using the third parameter of window.open method, you get a window.

Exemple :

window.open('http://www.stackoverflow.com', '_blank', 'width=500, height=400')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.