-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathAngular_notes_ep_12.txt
More file actions
85 lines (65 loc) · 1.96 KB
/
Copy pathAngular_notes_ep_12.txt
File metadata and controls
85 lines (65 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Episode #12 - Angular Modules
1. Angular is a modular-based architecture
- There are lot of modules which are built-in
- Examples
- BrowserModule
- BrowserAnimationsModule
- Angular Material Library
- MatButtonModule
- MatDropDownModule
2. All the code and functionality is grouped in a module
3. Whenever you see a @ symbol - it's a decorator
4. What modules consist
- declarations
- this is where we will add all the components of the module
- imports
- we can import modules inside a module
- providers
- services that we need will be injected here
- Bootstrap
- what is the first component, the module should load
- exports
- is to export and expose the component outside of the module
5. Every Angular application should have atleast 1 module
6. By default, the Angular framework provides us with AppModule
7. The AppModule will have a component by the name
- AppComponent
8. Whenever we are building Angular applications
- We will always think of Modules first
E.g
Contacts
Users
Leads
Opportunites
Settings
Profile
Authenctication
Free User
Contacts
Users
Premium User
Contacts
Users
Leads
Opportunites
Enterprise Users
Contacts
Users
Leads
Opportunites
Settings
Profile
Authenctication
9. Feature Modules
- You can turn on or off the modules based on conditions
10. Modules - Grouping
- components
- services
- pipes
- directives
11. Create a custom Module
ng generate module contacts
ng generate module leads
ng generate module settings
ng generate module Opportunites
ng generate module authentication