Closed
Description
$ ng --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.2-mobile.3
node: 5.10.1
os: linux x64
how do I set up a mapping for my app root to import?
I'm trying to avoid doing:
import { stuff } from '../../../../../../../components/some/path-to/what/iwant
and would like to do:
import { stuff } from 'myAppName/components/some/path-to/what/iwant
it is more intuitive, to specify an app-relative path, especially when refactoring (so you don't need to open the file tree, and count how many ../ you have...
I've tried adding mappings in my system-config.ts, but I haven't found anything to work.
const map: any = {
'@app': 'src'
};
doesn't work -- as in:
import { stuff } from '@app/components/mystuff'
errors on build.