JSFiddle - React, Tailwind, and code Playground
by mehulkar
HTML
<script src="https://github.com/downloads/wycats/handlebars.js/handlebars-1.0.0.beta.6.js"></script>
<script src="https://raw.github.com/emberjs/ember.js/release-builds/ember-1.0.0-pre.4.js"></script>
<script type="text/x-handlebars">
<h1>Header</h1>
{{#linkTo "index"}} Home {{/linkTo}}
{{#linkTo "videos.index"}} Videos {{/linkTo}}
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="videos/index">
<p>The videos page</p>
</script>
JavaScript
App = Ember.Application.create();
App.Router.map(function() {
this.resource('about', function() {
this.route('/');
this.route('page1');
this.route('pag22');
});
});
App.Router.map(function() {
this.resource('videos', function() {
this.route('new');
this.route('video', {path: ':video_id'});
});
});
// Uncomment below to see ember throw up
/*
App.Router.map(function() {
this.resource('users', function() {
this.route('user', {path: ':user_id'});
});
});
*/