-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gregghz-component-params'
- Loading branch information
Showing
4 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package angulate2.router | ||
|
||
import scala.scalajs.js | ||
import scala.scalajs.js.| | ||
import scala.scalajs.js.annotation.JSName | ||
import rxjs.core.IObservable | ||
|
||
@js.native | ||
@JSName("ng.router.ActivatedRoute") | ||
trait ActivatedRoute extends js.Object { | ||
val snapshot: ActivatedRouteSnapshot = js.native | ||
val url: IObservable[UrlPathWithParams] = js.native | ||
val params: IObservable[js.Dynamic] = js.native | ||
val data: IObservable[js.Any] = js.native | ||
val outlet: String = js.native | ||
val component: js.Any = js.native | ||
} | ||
|
||
@js.native | ||
trait ActivatedRouteSnapshot extends js.Object { | ||
val url: js.Array[UrlPathWithParams] = js.native | ||
val params: js.Dynamic = js.native | ||
val data: js.Any = js.native | ||
val outlet: String = js.native | ||
val component: js.Any = js.native | ||
} | ||
|
||
@js.native | ||
trait UrlPathWithParams extends js.Object { | ||
val path: String = js.native | ||
val parameters: Map[String, String] = js.native | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package angulate2.router | ||
|
||
import scala.scalajs.js | ||
import scala.scalajs.js.annotation.JSName | ||
|
||
@js.native | ||
@JSName("ng.router.RouterConfig") | ||
trait RouterConfig extends js.Object | ||
|
||
object RouterConfig { | ||
def apply(defs: RouteDefinition*): RouterConfig = { | ||
js.Array(defs: _*).asInstanceOf[RouterConfig] | ||
} | ||
} |