Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/24.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
Javascript 无法加载角度模块textangular_Javascript_Angularjs - Fatal编程技术网

Javascript 无法加载角度模块textangular

Javascript 无法加载角度模块textangular,javascript,angularjs,Javascript,Angularjs,按照这里的说明操作之后 1) 添加了带有textagnular js文件的脚本标记 2) 在我的应用程序定义中 var myApp_ = angular.module('myApp', [ 'ui.bootstrap', 'ngResource']); 我把它改成了 var myApp_ = angular.module('myApp', [ 'ui.bootstrap', 'ngResource' , 'textAngular']); 我明白了 未捕获错误:[$injector:modu

按照这里的说明操作之后

1) 添加了带有textagnular js文件的脚本标记

2) 在我的应用程序定义中

var myApp_ = angular.module('myApp', [ 'ui.bootstrap', 'ngResource']);
我把它改成了

var myApp_ = angular.module('myApp', [ 'ui.bootstrap', 'ngResource' , 'textAngular']);
我明白了 未捕获错误:[$injector:modulerr]>未能实例化模块textAngular。 当模块由于某些异常而无法加载时,会发生此错误

我还缺少什么?

它还有一些额外的功能。角度清理模块,这是一个单独的文件


如果您使用的是已经链接到其卫生模块的textAngular的缩小版,并且不需要包含额外的链接(至少对于我通过bower数据包管理器获得的版本),则可以从

下载它。

包含(textAngularSetup.js和textAngular.js)或仅包含textAngular.min.js (textAngularSetup.js包含在textAngular.min.js中)


检查确保在html中的include of angular.js下面包含de textangle-xxx.js。

没有忘记在index.html中包含textangle.js吗?在angular.js之后和应用程序代码之前?不…我有包含它的脚本标记。你能显示你的index.html吗?要添加更正,建议你使用包含的文本angular sanitize而不是angular sanitize。它们本质上是相同的,除了textAngular允许一些特定的样式属性通过。@SimeonCheseman我已经在我的应用程序模块中包括了“textAngular sanitize.min.js”和依赖项“ngSanitize”。但当我将内联样式添加到textAngular的内容时,它仍然会被剥离。我使用的是最新版本1.3.7。如果我遗漏了什么,请告诉我!!!你不需要将“ngSanitize”依赖项添加到你的应用程序中(它是textangle的依赖项)。如果你以前没有,我猜你也在加载“角度清理”和“文本角度清理”。此外,“textAngular Sanitize”仅支持少量内联样式。主要包括颜色、背景色、文本对齐、浮动、宽度、高度和方向。参考:另外,1.5.x的最新版本强制您使用比angular更干净的消毒液。