将所选模块添加到角度应用

时间:2017-05-15 13:42:38

标签: angularjs typescript jquery-chosen

我正在使用AngularJS应用程序。我正在使用打字稿。 问题是我正在尝试添加角度选择的新模块。但我选择的错误不是函数。在app.module.ts 我做的是在app.module.ts:

Import "angular-chosen-localytics";
angular.module('app',['localytics.directives']). 

然后我试着在index.html中调用selected.js,但是我得到了错误"无法获取文件" .I验证该文件在node_modules / dist目录下可用。

2 个答案:

答案 0 :(得分:0)

我想你只是忘了把它添加到* .html文件中:

while

答案 1 :(得分:0)

angular-chosen-localytics不支持ES6模块。

您可以尝试require/import 'angular-chosen-localytics/dist/angular-chosen'jquery个文件,但我想它不会走得太远,因为它需要dotnetcore 2.1.0-preview1-final($)位于顶层。

相关问题