You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: frontend/angular-best-practices.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,6 @@ A module whose class defined with the above constructor will throw an exception
42
42
43
43
It is not recommended that a module provides services and declares declarables. If that happens, such as the `RouterModule`, use `forRoot()` to provide and config services for the root module and `forChild()` for other modules.
44
44
45
-
46
45
### 解决 Module 冲突
47
46
48
47
出现场景:
@@ -60,7 +59,7 @@ It is not recommended that a module provides services and declares declarables.
60
59
},
61
60
```
62
61
63
-
那么就回会出现下面的错误提示:
62
+
那么就会出现下面的错误提示:
64
63
65
64
```bash
66
65
ERROR in Duplicated path in loadChildren detected: "./domestic-flight/domestic-flight.module#DomesticFlightModule" is used in2 loadChildren, but they point to different modules "(/Users/vm/Workspace/Webs/Angular/tehang-system/src/app/routes/order/domestic-flight/domestic-flight.module.ts and "/Users/vm/Workspace/Webs/Angular/tehang-system/src/app/routes/basic-resource/domestic-flight/domestic-flight.module.ts"). Webpack cannot distinguish on context and would fail to load the proper one.
@@ -143,7 +142,8 @@ createForm() {
143
142
- 需要注意是否是最新的状态,因为可能某个表单项改变了验证规则,但是没有更新 from 状态.
144
143
- 或者改变任意一项,请使用 `control.updateValueAndValidity()` 以保证 form 状态的正确性
0 commit comments