What is the difference between AngularJS $window.alert() and Javascript alert()? -


It looks like AngularJS $ window.alert () and JavaScript Alert () are the same. Under what circumstances should we use them? Or is there any difference at all?

this is exactly the same - in the global way browser in javascript) window The methods are the AngularJS 'nickname for the' window object.

$ Window: Reference to Browser's Window Object

Note that you override the $ window for your tests But both are similar in regular code.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -