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
+51Lines changed: 51 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,3 +68,54 @@ createForm() {
68
68
- Use `providedIn: 'root'` for all services, either global or local, which should be available as singletons.
69
69
- Use file structure to scope services. A module can only use services that are in its subfoler or share the same parent folder.
70
70
- Use `providers: []` for services that 1) need initialization (such as `myService.forRoot()`) or 2) inside `@Component` or `@Directive` for scoped mulitple-instance services.
0 commit comments