<html>
<head>
<title>Emberjs Template</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js"></script>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.10.0/ember.min.js"></script>
<script src="http://builds.emberjs.com/tags/v1.10.0-beta.3/ember-template-compiler.js"></script>
<script src="http://builds.emberjs.com/release/ember.debug.js"></script>
<script src="http://builds.emberjs.com/beta/ember-data.js"></script>
</head>
<body>
<script type="text/x-handlebars" data-template-name="application">
<!-- name of the template is application and it is default template -->
<div>
{{outlet}}
</div>
</script>
</body>
</html>
<script type="text/x-handlebars" data-template-name="index">
<h2>Using setupController function:</h2>
{{content}}
</script>
<script type="text/javascript">
App = Ember.Application.create();
App.IndexRoute = Ember.Route.extend({
//set up the controller and its content
setupController: function(controller) {
controller.set('content','Welcome to Tutorials Point');
}
});
</script>
<script type="text/x-handlebars" data-template-name="index">
<h2>Using setupController function:</h2>
{{content}}
</script>
<script type="text/javascript">
App = Ember.Application.create();
App.IndexRoute = Ember.Route.extend({
//set up the controller and its content
setupController: function(controller) {
controller.set('content','Welcome to Tutorials Point');
}
});
</script>