angular 4 应用程序在智能电视网络浏览器(网络浏览器)中不起作用
angular4 application is not working in smart tv's web browser(WebOSBrowser)
我尝试在服务器中部署我的 angular4 应用程序,它在桌面浏览器和移动设备上运行良好 browser.Now 我想从智能电视上浏览该应用程序,但它显示一个空白页面而不是应用程序,在智能电视上浏览我的应用程序可能是什么实际问题?
如果我需要添加任何依赖项,特别是对于智能电视(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/parse-int';
import 'core-js/es6/parse-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';
在angular 8.请将tsconfig.json文件-"target":"es2015",改为"target":"es5",
我尝试在服务器中部署我的 angular4 应用程序,它在桌面浏览器和移动设备上运行良好 browser.Now 我想从智能电视上浏览该应用程序,但它显示一个空白页面而不是应用程序,在智能电视上浏览我的应用程序可能是什么实际问题? 如果我需要添加任何依赖项,特别是对于智能电视(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/parse-int';
import 'core-js/es6/parse-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';
在angular 8.请将tsconfig.json文件-"target":"es2015",改为"target":"es5",