Undefined attribute name (ng-model) at Eclipse

后端 未结 4 1057
你的背包
你的背包 2021-02-19 04:11

My Eclipse is accusing an error in tag \"ng-model\"

My eclipse is warning the ng-model att when I save the file:





        
4条回答
  •  执笔经年
    2021-02-19 04:57

    When using Eclipse (Mars.1 Release (4.5.1) - and possibly earlier - I did not check).

    Go to Window - Preferences
    Then in the dialog that opens go to Web - HTML Files - Validation.
    On the right side:

    1. under Ignore specified attribute names in validation do the same for your custom attributes.(e.g. ng-*,my-attr-directives-*)
    2. you might also like to go under Ignore specified element names in validation and enter the list of custom elements you use. (e.g. tab,tabset,my-element-directives-*)
    3. In order to ignore any undefined attributes, scroll to the Attributes section, unfold it, then under Undefined attribute value:, select Ignore.

    Two things to note:

    1. After letting eclipse do a full validation you must also close the file and reopen it to have the warnings removed from the source code.
    2. Using this method would ignore those attributes under any element

提交回复
热议问题