$location.state()

state([state]);

This method is getter / setter.

Return the history state object when called without any parameter.

Change the history state object when called with one parameter and return $location. The state object is later passed to pushState or replaceState.

NOTE: This method is supported only in HTML5 mode and only in browsers supporting the HTML5 History API (i.e. methods pushState and replaceState). If you need to support older browsers (like IE9 or Android < 4.0), don't use this method.

Parameters

Param Type Details
state
(optional)
object

State object for pushState or replaceState

Returns

object

state

doc_AngularJS
2016-03-29 16:10:30
Comments
Leave a Comment

Please login to continue.