Ember.js for multipage applications
Krzysztof Modras @chrmod
We talk about JavaScript. Each month in Warsaw, Poland.
Krzysztof Modras @chrmod
$(document).ready(function () {
$('#click-it-please").on('click', function () {
$(this).hide('slow', function () {
i guess here you have some black business magic
});
});
}
// app.js
App = Ember.Application.create({
rootElement: "#content"
});
// in template
<script type="text/x-handlebars">
some nice handlebars template
</script>
App.ApplicationRoute = App.Feature1Route.extend();
App.ApplicationController = App.Feature1Controller.extend();
App.ApplicationView = App.Feature1View.extend();
It is not really an application code. You may consider it as configuration. Each single page that needs more advanced JS can have one.