小编JOh*_*hns的帖子

Angular6类型的“ JQuery”上不存在属性“ modal”

我在TypeScript Angular6中使用jQuery时出现以下错误,请帮我

jQuery('#assignsp').modal('show');
Run Code Online (Sandbox Code Playgroud)

遵循这些步骤

3个步骤:

安装jQuery。(如果已安装,请跳过)

npm install jquery --save jQuery的安装类型。

npm install @ types / jquery-保存

Import jQuery in app.module.ts.

import * as $ from 'jquery';
Run Code Online (Sandbox Code Playgroud)

它告诉我错误

错误TS2339:类型“”上不存在属性“模式”JQuery<HTMLElement>

错误TS2339:类型“ JQuery”上不存在属性“模式”。

jquery typescript angular angular6

2
推荐指数
1
解决办法
4678
查看次数

如何解决NPM脚本“开始”退出而未指示Angular CLI

我面临此错误,当我使用angularjs在IIS中发布我的应用程序时,请帮助我,请帮助我如何使用.net core 2.1和angularjs解决此错误。在Visual Studio正常工作中,我在IIS中遇到此错误

  services.AddSpaStaticFiles(configuration =>
            {
                configuration.RootPath = "ClientApp/dist";
            });
            });


app.UseSpa(spa =>
        {
            // To learn more about options for serving an Angular SPA from ASP.NET Core,
            // see https://go.microsoft.com/fwlink/?linkid=864501

            spa.Options.SourcePath = "ClientApp";

            if (env.IsDevelopment())
            {
                spa.UseAngularCliServer(npmScript: "start");
            }
        });
Run Code Online (Sandbox Code Playgroud)

错误截图: 屏幕截图

.net-core asp.net-core angular angular6

1
推荐指数
1
解决办法
5796
查看次数

标签 统计

angular ×2

angular6 ×2

.net-core ×1

asp.net-core ×1

jquery ×1

typescript ×1