禁止“检测到循环依赖".在Angular 6中取消警告 [英] Suppress "Circular dependency detected" suppress warning in Angular 6

查看:543
本文介绍了禁止“检测到循环依赖".在Angular 6中取消警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到警告

检测到循环依赖!

Circular dependency detected!

在Angular 6中,我知道为什么会出现此问题,但这根本不是问题.

in Angular 6 and I know why this problem appears, but it is not a problem at all.

我目前正在使用SVG,按照我的逻辑,我避免了可能的问题,所以我只想取消此警告.我该怎么办?

I am currently working with SVG, and in my logic I prevent possible problems so I just want to suppress this warning. How can I do that?

此后我将解决此问题,但现在我想保留它,因为我的代码以这种方式更结构化.

I will fix this problem afterwards but for now I want to keep it because my code is more structured this way.

推荐答案

此处是angular.json文件的正确路径:

Here the right path into the angular.json file :

projects -> architect -> options - > "showCircularDependencies": false

这篇关于禁止“检测到循环依赖".在Angular 6中取消警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆