我在Angular 10上,当我在本地主机上工作并且“运行”我的项目时,与“ DataTables”一起使用的表工作正常。
但是,当我在Netlify上部署解决方案时,我不再看到我的表,并且在我的浏览器控制台上也没有显示错误。
这是我的依赖项Package.json:
"dependencies": {
"@angular/animations": "~10.1.0",
"@angular/cdk": "^10.2.0",
"@angular/common": "~10.1.0",
"@angular/compiler": "~10.1.0",
"@angular/core": "~10.1.0",
"@angular/forms": "~10.1.0",
"@angular/material": "^10.2.0",
"@angular/platform-browser": "~10.1.0",
"@angular/platform-browser-dynamic": "~10.1.0",
"@angular/router": "~10.1.0",
"angular-datatables": "^9.0.2",
"bootstrap": "^4.5.2",
"datatables.net": "^1.10.22",
"datatables.net-dt": "^1.10.22",
"datatables.net-searchbuilder-bs4": "^1.0.0",
"jquery": "^3.5.1",
"pdfmake": "^0.1.68",
"popper.js": "^1.16.1",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1001.0",
"@angular/cli": "~10.1.0",
"@angular/compiler-cli": "~10.1.0",
"@types/datatables.net": "^1.10.19",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/jquery": "^3.5.1",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.0.2"
}
我搜索了互联网,但我认为我是唯一遇到这个小问题的人^^
预先感谢您的帮助。
答案 0 :(得分:0)
很好!我找到了解决方案(这是我的错^^)
我在*ngIf
上放置了table
条件,如果为空,则不会显示任何内容:p
在Localhost中,它已满,但是由于我是在线部署(Netlify)的,所以它仍然是空的^^
我花了几个小时寻找... 解决方案解决了。