我正在使用scalajs / angulate
我遇到的问题只有在表单上使用type="email"
时才会出现。当我将其更改为type="text"
时,问题就会消失。
问题表现在:
"An undefined behavior was detected: undefined is not an instance of java.lang.String"
这是我的控制器
class FooInfoController(…) extends Controller {
var name: String = _
var email: String = _
…
}
和html
<div class="wrapper" ng-controller="FooInfoController as ctrl">
<form ng-submit="ctrl.add()">
<div class="form-group">
<label for="email">Email</label>
<input class="form-control" id="email" required maxlength="80" name="email" size="20" type="email"
ng-model="ctrl.email"
placeholder="email address">
</div>
</form>
</div>