jokade / angulate2

Scala.js bindings for Angular
MIT License
87 stars 15 forks source link

Extension: Routes() annotation #52

Closed jokade closed 7 years ago

jokade commented 7 years ago

Simplify creation of routing modules:

@Routes(
  root = true,
  Route(path = "/heroes", component = %%[HeroesComponent]),
  Route(path = "**", component = %%[PageNotFoundComponent] )
class AppRoutingModule

@NgModule(
  imports = @@[AppRoutingModule] )
class AppModule
jokade commented 7 years ago

Renamed @Router() to @Routes due to collision with router.Router