Currently, I am building an Angular2
application using version 2.0.0-beta.7
along with TypeScript
. Initially, I had all my .ts
files in a single directory for quick functionality access. However, now I am striving to reorganize them logically within a directory structure that aligns with the application's logic and features. This restructuring has resulted in many lines similar to these:
import {Config} from '../../../../../config/app-config';
... and also...
@Component({
selector: 'traffic-info',
templateUrl: '../../../../../../views/traffic-info.html'
})
These numerous ../
can be quite bothersome, but it is known that the path values must be relative to the current script. Hence, I am curious if there exists a method to establish a default (base) import path or a similar solution to eradicate these repetitive 'one level up' maneuvers.