Represents the browser.
Adds a stylesheet tag to the head.
url – {string} –
Url to css fileAdds a script tag to the head.
url – {string} –
Url to js filedom_id(optional) – {string} –
Optional id for the script tag Adds a function to the list of functions that poller periodically executes
fn – {function()} –
Poll function to addRegister hover function to real browser
The cookies method provides a 'private' low level access to browser cookies. It is not meant to be used directly, use the $cookie service instead.
The return values vary depending on the arguments that the method was called with as follows:
name(optional) – {string} –
Cookie namevalue(optional) – {string} –
Cokkie valueExecutes a fn asynchroniously via setTimeout(fn, delay)
.
Unlike when calling setTimeout
directly, in test this function is mocked and instead of using
setTimeout
in tests, the fns are queued in an array, which can be programaticaly flushed via
$browser.defer.flush()
.
fn – {function()} –
A function, who's execution should be defered.delay(optional=0) – {int} –
of milliseconds to defer the function execution.Get current browser's url
Set hover listener.
listener – {function(Object, boolean)} –
Function that will be called when hover event
occurs.callback – {function()} –
Function that will be called when no outstanding requestDetects if browser support onhashchange events and register a listener otherwise registers
$browser poller. The listener
will then get called when the hash changes.
The listener gets called with either HashChangeEvent object or simple object that also contains
oldURL
and newURL
properties.
NOTE: this is a api is intended for sole use by $location service. Please use
$location service
to monitor hash changes in angular apps.
listener – {function(event)} –
Listener function to be called when url hash changes.Sets browser's url
url – {string} –
New urlConfigures the poller to run in the specified intervals, using the specified setTimeout fn and kicks it off.
interval – {number} –
How often should browser call poll functions (ms)setTimeout – {function()} –
Reference to a real or fake setTimeout
function.Send ajax request
method – {string} –
Requested method (get|post|put|delete|head|json)url – {string} –
Requested urlpost(optional) – {string} –
Post data to send callback – {function(number, string)} –
Function that will be called on response