Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Angularjs不工作_Html_Angularjs - Fatal编程技术网

Html Angularjs不工作

Html Angularjs不工作,html,angularjs,Html,Angularjs,我正在做一个web项目,我正在用angular js来显示图像,如果我点击一个图像,它会被放大。我已经创建了一个示例应用程序,它工作正常,但当我开始创建一个示例应用程序时,它会对其内部标记发出警告 提供警告的我的Html文件(适用于ng应用程序、ng控制器、ng src、ng重复) 角相册 jsp 您的问题似乎在这里: <div ng-controller="AlbumCtrl"> 我看不出这个控制器是在哪里定义的。可能是您的文件扩展名搞错了,这就是为什么: <

我正在做一个web项目,我正在用angular js来显示图像,如果我点击一个图像,它会被放大。我已经创建了一个示例应用程序,它工作正常,但当我开始创建一个示例应用程序时,它会对其内部标记发出警告

提供警告的我的Html文件(适用于ng应用程序、ng控制器、ng src、ng重复)


角相册
jsp

您的问题似乎在这里:

<div ng-controller="AlbumCtrl">

我看不出这个控制器是在哪里定义的。可能是您的文件扩展名搞错了,这就是为什么:

<script src="${pageContext.request.contextPath}/css/album.css"></script>
<!-- I would have expected to see .js, not .css, in the path above -->


如果在正文底部添加Javascript会发生什么?@Matt你在说哪个Javascript..对不起,我指的是脚本标签。我不太熟悉Angular,但我知道在添加JS源文件后,使用主干定义模板时遇到问题。你的AlbumCtrl代码在哪里?发布你的控制器代码和主Angular模块,发布警告
<script src="${pageContext.request.contextPath}/css/album.css"></script>
<!-- I would have expected to see .js, not .css, in the path above -->