This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DS.RESTAdapter.map('App.Database', { | |
primaryKey: 'name' | |
collections: { embedded: 'load' } | |
}); | |
DS.RESTAdapter.map('App.Collection', { | |
primaryKey: 'name' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EmberTodo.ItemController = Ember.ObjectController.extend({ | |
completed: function(key, value) { | |
if (arguments.length > 1){ | |
var item = this.get("content"); | |
console.log("initial value"); | |
console.log(item.get("completed")); | |
item.set("completed", value); | |
console.log("after value"); | |
console.log(item.get("completed")); | |
console.log("is dirty?"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="scripts/vendor/jquery.min.js"></script> | |
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet" type="text/css" /> | |
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" /> | |
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.js"></script> | |
<title>Skillshare</title> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assume you are using a bound array named links that is defined like [{link: 'some link', title: 'my nifty link', active: true}, ...] | |
//in JS file. I will assume you have an app called MyApp that was create with Em.Application.create() | |
MyApp.linksController = Em.ArrayProxy.create({ | |
content: [ { link: 'I am a link', title: 'I am a title', active: true } ] | |
}); | |
<!-- Navbar | |
================================================== --> |