.net core .net core angular 6 app ngx引导程序不工作错误:';无法获取/';
我正在尝试让ngx引导(首先是ToolTimpModule)在我的.NETCore2.1Angular6应用程序中工作(我已经从Angular5升级到6)。 我听从了他的指示 因此,我执行以下步骤:-.net core .net core angular 6 app ngx引导程序不工作错误:';无法获取/';,.net-core,angular6,ngx-bootstrap,.net Core,Angular6,Ngx Bootstrap,我正在尝试让ngx引导(首先是ToolTimpModule)在我的.NETCore2.1Angular6应用程序中工作(我已经从Angular5升级到6)。 我听从了他的指示 因此,我执行以下步骤:- 1. npm install ngx-bootstrap --save 2. // RECOMMENDED (doesn't work with system.js) import { TooltipModule } from 'ngx-bootstrap/tooltip'; //
1. npm install ngx-bootstrap --save
2. // RECOMMENDED (doesn't work with system.js)
import { TooltipModule } from 'ngx-bootstrap/tooltip';
// or
import { TooltipModule } from 'ngx-bootstrap';
@NgModule({
imports: [TooltipModule.forRoot(),...]
})
export class AppModule(){}
3. <button type="button" class="btn btn-primary"
tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Simple demo
</button>
好的,所以我设法解决了这个问题。我觉得自己很愚蠢。我正在运行npm安装ngx引导程序--保存在错误的文件夹中。因此,我将cd刻录到正确的文件夹中,该文件夹名为my app folder/ClientApp运行命令并打包。json在那里显示ngx引导,node_模块现在有ngx引导文件夹并导入模块工作:)尝试:
ng add @ng-bootstrap/schematics
更新package.json:
"@ng-bootstrap/schematics": "^2.0.0-alpha.1",
"@ng-bootstrap/ng-bootstrap": "^2.0.0-alpha.0",
更新app.module.ts(导入中):
更新angular.json(样式):
我刚刚看到在我的packages.json文件中没有ngx引导,在我的node_modules文件夹中没有ngx引导文件夹。这可能是错误吗
"@ng-bootstrap/schematics": "^2.0.0-alpha.1",
"@ng-bootstrap/ng-bootstrap": "^2.0.0-alpha.0",
NgbModule.forRoot()
{"input": "./node_modules/bootstrap/dist/css/bootstrap.css"}