Eclipse未定义的属性名称(ng-model) [英] Undefined attribute name (ng-model) at Eclipse

查看:856
本文介绍了Eclipse未定义的属性名称(ng-model)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Eclipse在标签ng-model中指责错误



我的eclipse在保存文件时警告ng模型att:

 <!DOCTYPE html> 
< html>
< head>
< meta charset =ISO-8859-1>
< title>角度学习< / title>
< script src =http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js\"></script>
< script src = .. / javascript / personController.js>< / script>
< script src = .. / javascript / carController.js>< / script>
< / head>
< body>
< divng -app =ng-controller =carController>
< input type =textng-model =firstName>< br> //在此行
< input type =textng-model =secondName>
< p> {{firstName ++ secondName}}< / p>
< / div>
< / body>
< / html>


解决方案>

由于Eclipse的HTML5验证器,您很可能会发出警告,请尝试使用data-ng-model来查看是否修复了您的问题。更多信息:
ng-app与data-ng-app有什么区别? $ b如果这不能帮助您尝试更改项目的属性(更多地在这里: http:// b log.diniscruz.com/2014/02/using-angularjs-in-eclipse-part-1.html


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

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

<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Angular Learn</title>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
<script src=../javascript/personController.js></script>
<script src=../javascript/carController.js"></script>
</head>
<body>
<div ng-app="" ng-controller="carController">
    <input type="text" ng-model="firstName"> <br>  // at this line
    <input type="text" ng-model="secondName">
    <p> {{ firstName + " " + secondName }} </p>
</div>
</body>
</html>

解决方案

Most likely you get a warning due to Eclipse's HTML5 validator. Try using data-ng-model to see if that fixes your issue. More information here: ng-app vs. data-ng-app, what is the difference?. If that doesn't help you try changing the project's properties(more here: http://blog.diniscruz.com/2014/02/using-angularjs-in-eclipse-part-1.html)

这篇关于Eclipse未定义的属性名称(ng-model)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆