I am doing the angular2
tutorial at this address: https://angular.io/docs/ts/latest/tutorial/toh-pt3.html I have put the hero
interface in a single
The tutorial has you putting all components and the interface file in the same directory hence the relative import './hero'
if you want to move it elsewhere you need to change this.
Edit: The code may still work but the compiler will complain because you are attempting an import from an incorrect location. I'd simply change the import based on your structure. For example:
app/
component1/
component1.ts
compnent2/
component2.ts
hero.ts
I would simply change the import to import {Hero} from '../hero'
.