HTML eclipse 中 angular 指令的语法错误 - 属性名称后必须跟“=”字符

HTML Syntax error in eclipse for angular directives - Attribute name must be followed by the ' = ' character

您好,我遇到了一个奇怪的问题。我正在尝试在我的应用程序中应用 angular 分页。我正在尝试实现代码示例 given here 我添加了所有 perfectly.My 应用程序都在 java spring 框架中。我的代码如下。我是 运行 eclipse 中的代码 mars.My 错误是

Attribute name "uib-pagination" associated with an element type "ul" must be followed by the ' = ' character.

<div class="imt_paginationCtr">     
   <ul uib-pagination total-items="bigTotalItems" ng-model="bigCurrentPage" max-size="maxSize" class="pagination-sm" boundary-links="true" num-pages="numPages"></ul>
</div>

JS 文件

var app=angular.module('formvalid', [ 'ui.utils','ngAnimate','ngSanitize', 'ui.bootstrap']);
    app.controller('validationCtrl', function($scope, $http) {
    $scope.totalItems = 64;
        $scope.currentPage = 4;

        $scope.setPage = function (pageNo) {
            $scope.currentPage = pageNo;
        };

        $scope.pageChanged = function() {
            $log.log('Page changed to: ' + $scope.currentPage);
        };

        $scope.maxSize = 5;
        $scope.bigTotalItems = 175;
        $scope.bigCurrentPage = 1;
});

我无法理解这个问题。我哪里做错了?

浏览器显示错误

Mon Mar 19 14:32:27 IST 2018 There was an unexpected error (type=Internal Server Error, status=500). Exception parsing document: template="workflow", line 256 - column 52

你的代码没有问题。 Eclipse 不够智能,无法识别这些指令。您可以禁用 HTML 验证 转到 Preferences -> Validation 并取消选中 HTML 的复选框,如下图所示。

或者您可以允许来自 Web -> HTML Files -> Validation 的那些指令,并在突出显示的输入框中添加要允许的指令。

如果您对其他编辑器开放,请尝试 VSCode 来处理您的 JS/UI 内容。