Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 我有;内部错误中的错误:意外插值“;在9中运行npm start时出错_Angular_Angular9 - Fatal编程技术网

Angular 我有;内部错误中的错误:意外插值“;在9中运行npm start时出错

Angular 我有;内部错误中的错误:意外插值“;在9中运行npm start时出错,angular,angular9,Angular,Angular9,我在运行npm start时出现此错误: [HPM] Subscribed to http-proxy events: [ 'error', 'close' ] chunk {main} main.js, main.js.map (main) 2.16 kB [initial] [rendered] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 722 bytes [initial] [rendered] chunk

我在运行
npm start
时出现此错误:

[HPM] Subscribed to http-proxy events:  [ 'error', 'close' ]

chunk {main} main.js, main.js.map (main) 2.16 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 722 bytes [initial] [rendered]
chunk {polyfills-es5} polyfills-es5.js, polyfills-es5.js.map (polyfills-es5) 518 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 711 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 882 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 340 kB [initial] [rendered]
Date: 2020-02-15T13:20:57.999Z - Hash: ddcf910bd445ac9ea9a0 - Time: 8343ms

ERROR in Internal Error: Unexpected interpolation
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

这也发生在我身上,我通过更新我的tsconfig来解决它。这使我能够看到阻止构建完成的html错误。这是我修改的

 "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true,
    "strictTemplates": true
  }
更新 在修复了所有明显的html错误后,错误仍然存在,经过广泛的研究,我发现了这一点 问题出在我的html中,我有这样一行:

style="background-image: {{currentuser.profile.photoURL}}"
这通常不是一个好的做法,删除这一行会立即清除错误。如果有人面临同样的问题,我建议退房

就我而言,我只是将上面的一行改为

[style.background-image]="currentuser.profile.photoURL"

在浏览器中打开开发工具时是否有任何错误?如果是这样的话,你能把它们添加到你的问题中吗?升级到v9后,这里也一样,没有任何细节。这里只写了一个错误。不知道是什么问题。如果我使用
ng serve
运行应用程序,我会得到-
无法得到