R
R
Run Utochkin2015-02-06 14:15:27
JavaScript
Run Utochkin, 2015-02-06 14:15:27

Why app freezes on windows phone 8.1?

I am developing an application on the Pivot template in Visual Studio Express 2013.
On one of the tabs, I execute the following code
file.html:

<body>
    <div id="mediumListIconTextTemplate" data-win-control="WinJS.Binding.Template">
        <span data-win-bind="innerText: text"> </span>

        <div>
            <h4 data-win-bind="innerText: title"></h4>
        </div>
    </div>
    <div class="fragment section2page">
        <section aria-label="Main content" role="main">
            <div id="myListView"
                 data-win-control="WinJS.UI.ListView"
                 data-win-options="{ itemDataSource : DataExample.dataList.dataSource,
            itemTemplate: select('#mediumListIconTextTemplate'),
            layout: {type: WinJS.UI.GridLayout}}">
            </div>
        </section>
    </div>
</body>

.js file:
(function () {
    "use strict";

    var ControlConstructor = WinJS.UI.Pages.define("/pages/hub/section1Page.html", {
        ready: function (element, options) {
            options = options || {};
            var myData = [
                { title: "Basic banana", text: "Low-fat frozen yogurt" },
                { title: "Banana blast", text: "Ice cream" },
                { title: "Brilliant banana", text: "Frozen custard" },
                { title: "Aligator", text: "Frozen custard" },
                { title: "Cligator", text: "Frozen custard" },
                { title: "Kligator", text: "Frozen custard" }
            ];
            var dataList = new WinJS.Binding.List(myData);
            var publicMembers =
               {
                   groupedItemsList: dataList
               };
            WinJS.Namespace.define("DataExample", publicMembers);
        }
    });

    WinJS.Namespace.define("HubApps_SectionControls", {
        Section1Control: ControlConstructor
    });
})();

When switching to this tab, the application freezes and in Visual 2013 the base.js file opens on the line with the code:
var terminateAppHandler = function (data, e) {
        debugger;
        MSApp.terminateApp(data);
    };

How can I solve the problem, where is the error, please tell me!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question