摘要:JS Bin /* @override http://localhost:8000/css/app.css *//* @override http://localhost:8000/css/app.css */body { font-family: sans-serif; background: #fff;}#master { position: absolute; left: 0; width: 200px; top: 0; bottom: 0; border-top: 1px solid #888;}#detail { position: ab...
阅读全文
摘要:Episode 5 body { margin-top: 30px }.active { color: red !important;}var App = Ember.Application.create();App.Router.map(function() { this.resource('user', {path: '/users/:user_id'}); this.resource('editUser', {path: '/users/:user_id/edit'});});App.ApplicationRoute = E
阅读全文
摘要:JS Bin body { font-family: sans-serif; color: #454545;}a { color: blue;}a.active { color: red;}var App = Ember.Application.create();App.Router.map(function() { this.resource('about', function() { this.route('product'); this.route('location'); }); this.resource('login'
阅读全文
摘要:Episode 5 body { margin-top: 30px }.active { color: red !important;}var App = Ember.Application.create();App.Router.map(function() { this.resource('user', {path: '/users/:user_id'}); this.resource('editUser', {path: '/users/:user_id/edit'});});App.ApplicationRoute = E
阅读全文
摘要:Episode 003 body { margin-top: 30px }.active { color: red !important;} var App = Ember.Application.create();App.Router.map(function() { this.resource('user', {path: '/users/:user_id'});});App.UserRoute = Ember.Route.extend({ model: function(params) { return users[params.user_id]; }}.
阅读全文
摘要:JS Bin var App = Ember.Application.create()App.name = "Hello World!";App.secondsOnPage = 0;setInterval(function() { App.set('secondsOnPage', App.get('secondsOnPage') + 1);}, 1000);
阅读全文
摘要:JS Bin var App = Ember.Application.create();App.ApplicationRoute = Ember.Route.extend({ model: function() { return users; }});var users = [ { id: 1, first: 'Ryan', last: 'Florence', avatar: 'https://si0.twimg.com/profile_images/3123276865/5c069e64eb7f8e971d36a4540ed7ca...
阅读全文
摘要:JS Bin var App = Ember.Application.create();App.ApplicationRoute = Ember.Route.extend({ model: function() { return { name: 'My App', timer: 0 }; }, activate: function() { this.interval = setInterval(function() { var timer = this.get('controller.model.timer'); this.set('contro...
阅读全文
摘要:index.html --> app.jsvar App = Ember.Application.create();App.ApplicationRoute = Ember.Route.extend({ model: function() { return users; }});var users = [ { id: 1, first: 'Ryan', last: 'Florence', avatar: 'https://si0.twimg.com/prof...
阅读全文