mardi 10 février 2015

Using Ember.js for Single Page Website (not really a web app)

I just want to try using Ember.js for a website I am doing (Disclaimer: I am a Java web developer, GWT).


So far what I have tried is to slap the whole body tag code into like this



<body>
<script type="text/x-handlebars">
<!-- The whole page -->
</script>
</body>


Now, I just want to take advantage of Ember.js stuff like components, models and validation for my website.


Here's a run down of the dependencies involved:



<script src="http://ift.tt/1LttwG1"></script>
<script src="http://ift.tt/1vh0krF" type="text/javascript"></script>
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
<script src="js/jquery-ui.js"></script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>

<!-- Ember -->
<script src="js/libs/handlebars-v3.0.0.js"></script>
<script src="js/libs/ember-template-compiler-1.10.0.js"></script>
<script src="js/libs/ember-1.10.0.debug.js"></script>
<script src="js/app.js"></script>


app.js



App = Ember.Application.create();

App.Router.map(function() {

});


The thing is, when I put the body into a x-handlebars script the jQuery plugins (like bxslider, carousel, etc.) that used to work would not work with the stuff that was inside the script tag.


What could be wrong with my approach?





Aucun commentaire:

Enregistrer un commentaire