angularjs - scalajs + uirouter how use it in the right way -
i'm try start scala.js , angular. i'm using greencatsoft/scalajs-angular (https://github.com/greencatsoft/scalajs-angular) port
i found sample https://github.com/josdirksen/smartjava/tree/master/scalajs
this sample using "classic" routeprovider
routeprovider .when("/home", route(homecontroller))
but use stateprovider.
i included dependecies:
jsdependencies += "org.webjars" % "angular-ui-router" % "0.2.14" / "angular-ui-router.js" dependson "angular.js"
an of cures in scala-module:
val module = angular.module("helloworld",seq("ui.router","mm.foundation"))
usage:
override def initialize() { stateprovider .state("home", state( url="/home" , templateurl = "mytest.html" ) ) }
but there no way "activate" state.
i'missing in
state apply
possibility add controller. unclear why or howi added controller in html
< div ng-controller="datacontroller">
any idea?
Comments
Post a Comment