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.

  1. i'missing in state apply possibility add controller. unclear why or how

  2. i added controller in html < div ng-controller="datacontroller">

any idea?


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -