This is the directory structure I am working with:
projectRoot
projectRoot/app
projectRoot/app/main.ts
projectRoot/app/factoryClasses/Person.ts
projectRoot/node_modules/*angular 2 files*
In my main.ts file, there are import statements like this:
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
import { Person } from './factoryClasses/Person.ts';//this works
import { Person } from 'factoryClasses/Person.ts';//this doesn't
platformBrowserDynamic().bootstrapModule(AppModule,TestModule);
Even though my main.ts is located in the app/ folder, it seems to be searching for the file in
projectRoot/node_modules/factoryClasses/Person.ts
rather than
projectRoot/app/factoryClasses/Person.ts
. This issue has arisen from following the angular.io quick start guide.