Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location#search should return Location #44

Closed
rparree opened this issue Apr 24, 2015 · 0 comments
Closed

Location#search should return Location #44

rparree opened this issue Apr 24, 2015 · 0 comments
Assignees
Milestone

Comments

@rparree
Copy link

rparree commented Apr 24, 2015

Many of the Location methods return this, like for example search. This allows a syntax such as:

$location.search("code","ABC").path("/people/edit")

see https://github.com/angular/angular.js/blob/a509e9aa149d0f88cc39f703d539f7ffd4cd6103/src/ng/location.js#L522

Location most likely should look like

trait Location extends js.Object {

  def absUrl(): String = js.native
  def url(url: String = null, replace: String = null): Location = js.native
  def protocol(): String = js.native
  def host(): String = js.native
  def port(): Int = js.native
  def path(): String = js.native
  def path(path: String): Location = js.native
  def search(search: js.Any, paramValue: js.Any = null) : Location = js.native
  def hash(hash: String = null): String = js.native
  def replace(): Location = js.native
}
@jokade jokade self-assigned this May 7, 2015
@jokade jokade added this to the v0.2 milestone May 7, 2015
@jokade jokade closed this as completed in 273101c May 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants