trait Location extends Object
Location - The $location service parses the URL in the browser address bar (based on the window.location) and makes the URL available to your application.
- Annotations
- @RawJSType() @native()
- See also
- Alphabetic
- By Inheritance
- Location
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
absUrl(): String
This method is getter only.
This method is getter only.
- returns
full url representation with all segments encoded according to rules specified in RFC 3986.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hash(hash: String): Unit
This method is getter / setter.
This method is getter / setter. Changes hash fragment when called with parameter and return $location.
- hash
New hash fragment
- returns
hash fragment when called without any parameter.
-
def
hash(): String
This method is getter / setter.
This method is getter / setter. Changes hash fragment when called with parameter and return $location.
- returns
hash fragment when called without any parameter.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
host(): String
This method is getter only.
This method is getter only. Note: compared to the non-angular version location.host which returns hostname:port, this returns the hostname portion only.
- returns
host of current url.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
path(path: String): Location.this.type
This method is setter.
This method is setter.
- path
New path
- returns
a reference to self
-
def
path(): String
This method is getter.
This method is getter.
- returns
path of current url when called without any parameter.
-
def
port(): Int
This method is getter only.
This method is getter only.
- returns
port of current url.
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
protocol(): String
This method is getter only.
This method is getter only.
- returns
protocol of current url.
-
def
replace(): Unit
If called, all changes to $location during current $digest will be replacing current history record, instead of adding new one.
-
def
search(search: Any = js.native, paramValue: Any = js.native): Object
This method is getter / setter.
This method is getter / setter. Return search part (as object) of current url when called without any parameter. Change search part when called with parameter and return $location.
- search
New search params - string or hash object. When called with a single argument the method acts as a setter, setting the search component of $location to the specified value. If the argument is a hash object containing an array of values, these values will be encoded as duplicate search parameters in the url.
- paramValue
If search is a string or number, then paramValue will override only a single search property. If paramValue is an array, it will override the property of the search component of $location specified via the first argument. If paramValue is null, the property specified via the first argument will be deleted. If paramValue is true, the property specified via the first argument will be added with no value nor trailing equal sign.
- returns
If called with no arguments returns the parsed search object. If called with one or more arguments returns $location object itself.
-
def
state(newState: Any = js.native): Object
This method is getter / setter.
This method is getter / setter. Change the history state object when called with one parameter and return $location. The state object is later passed to pushState or replaceState.
- newState
State object for pushState or replaceState
- returns
the history state object when called without any parameter.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
url(): String
This method is getter.
This method is getter.
- returns
url (e.g. /path?a=b#hash) when called without any parameter.
-
def
url(url: String): Unit
This method is setter.
This method is setter.
- url
New url without base prefix (e.g. /path?a=b#hash)
- returns
url (e.g. /path?a=b#hash) when called without any parameter.
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )