Skip to content

Instantly share code, notes, and snippets.

@yoga1290
Created March 31, 2014 10:17
Show Gist options
  • Save yoga1290/9889327 to your computer and use it in GitHub Desktop.
Save yoga1290/9889327 to your computer and use it in GitHub Desktop.
body {
font-family: Helvetica, Arial, sans-serif;
}
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0/handlebars.js"></script>
<script src="http://builds.emberjs.com/ember-latest.js"></script>
<script src="http://builds.emberjs.com/canary/ember-data.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<script type="text/x-handlebars" data-template-name="index">
{{text}}
<br>
{{content.text2}}
</script>
</body>
</html>
App = Ember.Application.create({
LOG_TRANSITIONS: true
//,
// LOG_TRANSITIONS_INTERNAL: true,
// LOG_VIEW_LOOKUPS: true,
// LOG_ACTIVE_GENERATION: true
});
App.Router.map(function() {
this.route('post', { path: ':postId' });
});
App.IndexRoute = Ember.Route.extend({
text:'Route',
setupController:function(controller,model){
controller.set('text','Text from setupController');
controller.set('content',this.controllerFor('abc').get('content')
);
}
});
App.AbcController=Ember.Controller.extend({
content:{
text:"Text from ABC Controller",
text2:"Text2 from ABC Controller"
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment