has anyone had issues with the underscore.js built-in template engine using a windows phone 7?
My App stops running when it comes to this line:
var Template = {
loadingWheel: _.template($("#loading_wheel").html())
};
An alert() before that line will be performed, an alert() after doesn’t happen so I assume it’s something about underscore templates.
I alread tried renaming Template to something else, I guess it’s not about a reserved name or something.
#loading_wheel is an inline script-tag template that looks like this:
<script type="text/template" id="loading_wheel">
<div class="loading">
<img src="/images/loading.gif" />
</div>
</script>
Hum, quite simple, isn’t it?
I’m using Backbone.js 0.9.2, Underscore.js 1.3.3 and Zepto 1.0.
The App is working on several iOs 4+5, Android 2.3, 2.6, 4.0, 4.1 and Blackberry Devices.
Just Windows Phone 7 is not showing anything.
It turned out that the problem wasn’t underscore specific but caused by the zepto framework, that obviously doesn’t support windows phone browsers.
This is why this line of code failed:
Using jquery instead works fine (but loads some 65KB more).