我试图在服务器中部署我的 angular4 应用程序,并在桌面浏览器和移动浏览器中正常工作。现在我想从智能电视浏览应用程序,但它显示一个空白页而不是应用程序,可能是什么实际问题在智能电视上浏览我的应用程序?伙计们,如果我需要添加任何依赖项,尤其是智能电视(WebOS 浏览器),请帮助我。
Angular CLi 项目::(.angular-cli.json)
`{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "project_name"
},
"apps": [`enter code here`
{
"root": "src",
"outDir": "./../WebContent",
"assets": [
"assets",
"rieterFavicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [
"../node_modules/chart.js/dist/Chart.js",
"app/resources/js/jquery-3.2.1.js",
"app/resources/js/theme-switch.js"
],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json"
},
{
"project": "src/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}`
pcakage.json
{
"name":"project_name",
"version":"0.0.0",
"license":"MIT",
"scripts":{
"ng":"ng",
"start":"ng serve",
"build":"ng build",
"test":"ng test",
"lint":"ng lint",
"e2e":"ng e2e"
},
"private":true,
"dependencies":{
"@angular/animations":"^4.0.2",
"@angular/common":"^4.0.0",
"@angular/compiler":"^4.0.0",
"@angular/core":"^4.0.0",
"@angular/forms":"^4.0.0",
"@angular/http":"^4.0.0",
"@angular/platform-browser":"^4.0.0",
"@angular/platform-browser-dynamic":"^4.0.0",
"@angular/router":"^4.0.0",
"@ng-idle/core":"^2.0.0-beta.11",
"@ng-idle/keepalive":"^2.0.0-beta.11",
"@ng2-dynamic-forms/core":"^1.4.18",
"@ng2-dynamic-forms/ui-primeng":"^1.4.18",
"@types/file-saver":"0.0.1",
"angular-file-saver":"^1.1.3",
"chart.js":"^2.6.0",
"core-js":"^2.4.1",
"file-saver":"^1.3.3",
"font-awesome":"^4.7.0",
"moment":"^2.18.1",
"ng2-page-scroll":"^4.0.0-beta.7",
"ng2-scroll-to":"^1.0.7",
"ng2-translate":"^5.0.0",
"primeng":"^4.1.1",
"rxjs":"^5.1.0",
"zone.js":"^0.8.4"
},
"devDependencies":{
"@angular/cli":"1.0.0",
"@angular/compiler-cli":"^4.0.0",
"@types/jasmine":"2.5.38",
"@types/node":"~6.0.60",
"codelyzer":"~2.0.0",
"jasmine-core":"~2.5.2",
"jasmine-spec-reporter":"~3.2.0",
"karma":"~1.4.1",
"karma-chrome-launcher":"~2.0.0",
"karma-cli":"~1.0.1",
"karma-jasmine":"~1.1.0",
"karma-jasmine-html-reporter":"^0.2.2",
"karma-coverage-istanbul-reporter":"^0.2.0",
"protractor":"~5.1.0",
"ts-node":"~2.0.0",
"tslint":"~4.5.0",
"typescript":"~2.2.0"
}
}
我有同样的问题,对我来说,在 polyfills.ts 这个进口
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/p-int';
import 'core-js/es6/p-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
import 'core-js/es6/reflect';
在角度 8。请将 tsconfig.json 文件-“目标”:“es2015”更改为“目标”:“es5”,
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(38条)