I'm using two ListViews in my app to display content, one works perfectly fine but the other throws an exception on launch. My html code of the ListView failing:
<div id="menuTemplate" data-win-control="WinJS.Binding.Template">
<div style="width:280px; height:80px;">
<h2 data-win-bind="innerHTML:displayText"></h2>
</div>
</div>
<div id="lectorganizeMenu" data-win-control="WinJS.UI.ListView"
data-win-options="{itemDataSource:menuSource.data,
itemTemplate:select('#menuTemplate')}">
</div>
In my javascript file connected with the html file I have the following lines at the beginning:
var menuList = new WinJS.Binding.List([{ displayText: 'Add Course'}]);
WinJS.Namespace.define('menuSource', { data: menuList });
When i comment out the lecorganizeMenu div the exception is not thrown so i know that it is the part failing.