7 Most Useful Commands in Angular Project
In this post, I will give you the 7 most helpful commands to speed up your Angular Project.
I assume you have already installed Angular CLI in your system. If not, please install it first from here and read further.
1. Generate app in the current directory
|
|
In case if you want to specify any path, replace ./
with ./your/path
.
2. Skip test files
|
|
This will not add .spec.ts
files into your project. You can even use this when generating components, directive, etc.,
3. Skip test & style’s related files
|
|
You can use this when you want to keep your app simple. This will only add typescript
& html
files by skipping .spec.ts
and .css|.scss|.sass|etc.,
.
4. Run & open your application
|
|
This will run your project and open’s automatically at the provided port. By default, it open’s at http://localhost:4200
5. Generate files where you wish
|
|
Let’s take an example of generating a component:
|
|
This will add a component related files in the app
directory. In case, you want it to be added in a subdirectory like app/pages
. You can use something like this:
|
|
6. Add supported libraries
|
|
With this, you can add supported libraries to your angular project will less manual work. Here is an example:
|
|
7. Build a deployable directory
|
|
Hope you like this post. Please subscribe to get updates on more posts like this.