Closed
Description
Please provide us with the following information:
OS?
Windows 10.
Versions.
angular-cli: 1.0.0-beta.17
node: 6.7.0
os: win32 x64
Repro steps.
Updating my app from beta.16 to beta.17, and trying to utilise the new baseUrl & paths configuration in tsconfig.json as follows:
"baseUrl": ".",
"paths": {
"@shared/*": [
"app/shared/*"
],
When I use
import { Http } from '@angular/http';
import { StorageService } from '@shared/services';
@Injectable()
export class AuthService {
constructor(private http: Http, private storageService: StorageService) { ... }
}
typescript and webpack compiles and builds without erros, but I get an error in chrome that says
Can't resolve all parameters for AuthService: (Http, ?)
But if I write:
import { Http } from '@angular/http';
import { StorageService } from './storage.service';
@Injectable()
export class AuthService {
constructor(private http: Http, private storageService: StorageService) { ... }
}
it works.
AuthService and StorageService are in the same folder app/shared/services/ and there's an index.ts with export * from './storage.service';
in it, so this should work right?
Is there anything more I need to add to tsconfig.json or angular-cli.json to get it to work?
Metadata
Metadata
Assignees
Labels
No labels