我的 index.html 说:
<script type="text/x-handlebars" data-template-name="loggedout">
<label>Username: </label>{{view Ember.TextField placeholder="your username" valueBinding="App.LoggedoutController.username"}}<br />
<label>Password: </label>{{view Ember.TextField placeholder="your password" valueBinding="App.LoggedoutController.password" type="password"}}<br />
<br /><button {{action login}}>Login</button>
</script>
该操作转到我的路由器,该路由器重定向到我的控制器
App.LoggedoutController = Ember.Controller.extend({
username: '',
password: '',
isError: false,
tryLogin: function() {
console.log("InController: launched");
var username = this.get("username");
console.log("Check:" + username);
....
但支票是空的。