Страница разрыва элемента "win-list-view" в проекте Universal Windows 8.1 с WinJS и Angular

Я пытаюсь простой универсальный проект Windows 8.1. Моя страница default.html:

<!DOCTYPE html>
<html ng-app="mainApp">
   <head>
   <meta charset="utf-8" />

   <!-- WinJS references -->
   <script src="scripts/services/winstore-jscompat.js"></script>
   <script src="node_modules/jquery/dist/jquery.min.js"></script>
   <script src="node_modules/winjs/js/base.min.js"></script>
   <script src="node_modules/winjs/js/ui.min.js"></script>

   <!-- angular -->
   <script src="node_modules/angular/angular.min.js"></script>
   <script src="node_modules/angular-route/angular-route.min.js"></script>
   <script src="node_modules/angular-winjs/js/angular-winjs.js"></script>

   <script src="scripts/app.js"></script>
   <script src="scripts/controllers/EventsController.js"></script>
   </head>

   <body>
      <div ng-view></div>
   </body>
</html>

Проект имеет один простой вид и простой контроллер. Когда я использую "win-list-view" в моем представлении (даже пустой win-list-view без ограничения), я получаю ошибку, которую я не понимаю.

HTML1300: Navigation occurred.
default.html
DOM7011: The code on this page disabled back and forward caching. For more      information, see: http://go.microsoft.com/fwlink/?LinkID=291337
default.html
Error: [$compile:noslot] http://errors.angularjs.org/1.5.3/$compile/noslot?    p0=true&p1=%3Cdiv%20class%3D%22ng-isolate-scope%22%20item-data-    source%3D%22manufacturers%22%20ng-transclude%3D%22true%22%3E
...

Моя страница открыта, но данные на экране в формате json. Весь массив привязки данных отображается на экране.

введите описание изображения здесь

Посмотреть:

<div>
    <win-list-view item-data-source="manufacturers">
        <win-item-template>
            <div>
                <h4>{{item.data.title}}</h4>
                <h6>{{item.data.text}}</h6>
            </div>

        </win-item-template>
        <win-list-layout></win-list-layout>
    </win-list-view>
</div>

контроллер:

(function () {

    angular.module("mainApp")
    .controller("EventsController", function ($scope) {
           $scope.manufacturers = [
                   { title: "marvelous mint", text: "gelato" },
                   { title: "succulent strawberry", text: "sorbet" },            
        ];
    })
}());

Мое приложение:

(function() {

    angular.module("mainApp", ["ngRoute", "winjs"]);
    angular.module("mainApp")
    .config(function ($routeProvider) {
        $routeProvider
            .when("/events", {
                templateUrl: "views/events.html",
                controller: "EventsController"
            })
            .otherwise({ redirectTo: "/events" });
    });

}());

Почему тег "win-list-view" на представлении вызвал эту ошибку?

Работа на Windows 8 с VS2015, может быть, это имеет влияние.

0 ответов

Другие вопросы по тегам