This file contains 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> | |
<head> | |
<title>Ember test</title> | |
<script type="text/javascript" src="../lib/jquery.min.js"></script> | |
<script type="text/javascript" src="../lib/ember.min.js"></script> | |
</head> | |
<body> | |
<h1>Ember Test</h1> | |
</body> | |
</html> |
This file contains 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
<script type="text/x-handlebars"> | |
Hello, <b>{{MyApp.name}}</b> | |
</script> |
This file contains 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> | |
<head> | |
<title>Ember test</title> | |
<script type="text/javascript" src="../lib/jquery.min.js"></script> | |
<script type="text/javascript" src="../lib/ember.min.js"></script> | |
</head> | |
<body> | |
<script type="text/x-handlebars"> | |
<img src="{{ Example.logo }}"><br /> | |
<h1>{{ Example.name }}</h1> |
This file contains 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> | |
<head> | |
<title>Ember test</title> | |
<script type="text/javascript" src="../lib/jquery.min.js"></script> | |
<script type="text/javascript" src="../lib/ember.min.js"></script> | |
</head> | |
<body> | |
<script type="text/x-handlebars"> | |
<img {{bindAttr src="Example.logo"}} alt="Logo"><br /> |
This file contains 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
Example.populate = Ember.ArrayController.create({ | |
getTweets: function() { | |
var self = this; | |
var url = "http://search.twitter.com/search.json?callback=?&q=%23EmberJS"; | |
$.getJSON(url, function(data) { | |
for (var i = 0; i < data.results.length; i++) { | |
console.log(data.results[i]); | |
}; | |
}) | |
} |
This file contains 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
Example = Ember.Application.create({ | |
name: "Example Application", | |
logo: "http://sympodial.com/images/logo.png", | |
ready: function() { | |
Example.populate.getTweets(); | |
} | |
}); |
This file contains 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
addItem: function(item) { | |
this.pushObject(item); | |
}, |
This file contains 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> | |
<head> | |
<title>Ember test</title> | |
<script type="text/javascript" src="../lib/jquery.min.js"></script> | |
<script type="text/javascript" src="../lib/ember.min.js"></script> | |
</head> | |
<body> | |
<script type="text/x-handlebars"> | |
<img {{bindAttr src="Example.logo"}} alt="Logo"><br /> | |
<h1>{{ Example.name }}</h1> |
This file contains 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> | |
<head> | |
<title>Ember test</title> | |
<script type="text/javascript" src="../lib/jquery.min.js"></script> | |
<script type="text/javascript" src="../lib/ember.min.js"></script> | |
</head> | |
<body> | |
<script type="text/x-handlebars"> | |
<img {{bindAttr src="Example.logo"}} alt="Logo"><br /> | |
<h1>{{ Example.name }}</h1> |
This file contains 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
<script type="text/x-handlebars"> | |
<img {{bindAttr src="Example.logo"}} alt="Logo"><br /> | |
<h1>{{ Example.name }}</h1> | |
{{view Example.ChangeQuery id="new-todo" placeholder="#EmberJS"}} | |
{{#view Example.LoopingView id="looping-view" }} | |
{{#each Example.populate}} | |
<li>{{ from_user_name }} - {{ text }}!</li> | |
{{/each}} |
OlderNewer