Skip to content
kmathy edited this page Jan 1, 2018 · 4 revisions

List your best practices to use ngrx better!

If you want to contribute to this part, please follow the same structure: a link to your section + your section body + sign with your pseudo + end by horizontal line.

Summary

Improve import syntax


Improve import syntax

Maybe you're tired to import your files like this:
import {Something} from '../../../path/to/something';

You can find an interesting article about best practices for your Angular app. For a convenient import syntax, just add the following in your tsconfig.json:

"paths": {
   "@app/*": ["app/*"],
   "@env/*": ["environments/*"]
}

So, you just need to import your files like this:
import { SomeService } from "@app/core"


Clone this wiki locally