21
21
> ng-icons</ a
22
22
>
23
23
</ li >
24
+ < li >
25
+ < a href ="https://motion.ngverse.dev " target ="_blank "
26
+ > @ngverse/motion</ a
27
+ >
28
+ </ li >
24
29
</ ul >
25
30
< h2 > Install @angular/cdk</ h2 >
26
31
< p >
@@ -64,9 +69,22 @@ <h2>Install tailwind (v4)</h2>
64
69
code ='@import "tailwindcss"; '
65
70
> </ doc-source-code >
66
71
< h2 > Add Angular animations</ h2 >
67
- < p > We use Angular animations for smooth transition between states</ p >
72
+ < p >
73
+ In order to do smooth transitions between states, we use
74
+ < a href ="http://motion.ngverse.dev/ " target ="_blank "> @ngverse/motion</ a >
75
+ library.
76
+ </ p >
77
+ < p class ="mb-0 "> Installation:</ p >
78
+ < doc-source-code
79
+ language ="bash "
80
+ code ="npm install @ngverse/motion "
81
+ > </ doc-source-code >
82
+ < p >
83
+ Then add < code > provideAnimationsAsync</ code > provider to your
84
+ < code > appConfig</ code > file to enable animations
85
+ </ p >
68
86
< doc-source-code language ="ts " [code] ="animationsCode "> </ doc-source-code >
69
- < h2 > Installing an Icons Library (Optional) </ h2 >
87
+ < h2 > Installing an Icons Library</ h2 >
70
88
< p >
71
89
Some components, such as the < code > select</ code > component, require icons.
72
90
We use the
@@ -75,41 +93,11 @@ <h2>Installing an Icons Library (Optional)</h2>
75
93
>
76
94
library (Material Icons preset) for this purpose.
77
95
</ p >
78
- < p >
79
- If you prefer not to use this library, you can skip this step and update the
80
- components manually when needed.
81
- </ p >
82
96
< doc-source-code
83
97
language ="bash "
84
98
code =" npm install @ng-icons/core @ng-icons/material-icons "
85
99
> </ doc-source-code >
86
- < h2 > Update typescript import</ h2 >
87
- < p >
88
- In < doc-project-name [code] ="true "> </ doc-project-name > , Components use
89
- absolute paths for internal imports. It’s recommended that you follow the
90
- same approach to keep your imports clean and maintainable. Instead of using
91
- long and cumbersome relative imports like:
92
- </ p >
93
- < doc-source-code
94
- language ="ts "
95
- [allowCopy] ="false "
96
- code ='import { ButtonComponent } from "../../../../button/button.component"; '
97
- > </ doc-source-code >
98
- < p > You should use an absolute path:</ p >
99
- < doc-source-code
100
- language ="ts "
101
- [allowCopy] ="false "
102
- code ='import { ButtonComponent } from "@ui/button/button.component"; '
103
- > </ doc-source-code >
104
- < p >
105
- In order to do that, update your root < code > tsconfig.json</ code > file with
106
- following path
107
- </ p >
108
- < doc-source-code language ="json " [code] ="tsImportCode "> </ doc-source-code >
109
- < p >
110
- < code > ./src/app/ui</ code > should be adjusted based on your project. In
111
- general this is the most used path
112
- </ p >
100
+
113
101
< h2 > Install < doc-project-name > </ doc-project-name > schematics</ h2 >
114
102
< doc-source-code
115
103
language ="bash "
@@ -148,4 +136,38 @@ <h2>Add <doc-project-name></doc-project-name> styles to styles.css</h2>
148
136
You are now ready to start using
149
137
< doc-project-name [code] ="true "> </ doc-project-name > in your Angular project!
150
138
</ p >
139
+ < h2 > Update typescript import (Optional)</ h2 >
140
+ < p >
141
+ In general, you should place all your
142
+ < doc-project-name [code] ="true "> </ doc-project-name > components in the same
143
+ folder. To import them, you can use either absolute or relative imports. The
144
+ recommended approach is to use absolute imports to prevent imports from
145
+ becoming too nested.
146
+ </ p >
147
+ < p >
148
+ This configuration is not required for
149
+ < doc-project-name [code] ="true "> </ doc-project-name > to work, but it is
150
+ considered a good practice.
151
+ </ p >
152
+ < p > So Instead of this import:</ p >
153
+ < doc-source-code
154
+ language ="ts "
155
+ [allowCopy] ="false "
156
+ code ='import { ButtonComponent } from "../../../../button/button.component"; '
157
+ > </ doc-source-code >
158
+ < p > It will become this:</ p >
159
+ < doc-source-code
160
+ language ="ts "
161
+ [allowCopy] ="false "
162
+ code ='import { ButtonComponent } from "@ui/button/button.component"; '
163
+ > </ doc-source-code >
164
+ < p >
165
+ In order to do that, update your root < code > tsconfig.json</ code > file with
166
+ following path
167
+ </ p >
168
+ < doc-source-code language ="json " [code] ="tsImportCode "> </ doc-source-code >
169
+ < p >
170
+ < code > ./src/app/ui</ code > should be adjusted based on your project. In
171
+ general this is the most used path
172
+ </ p >
151
173
</ doc-blog-page >
0 commit comments