Closed
Description
Bug Report or Feature Request (mark with an x
)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.0.0
node: 6.9.1
os: win32 x64
@angular/common: 4.0.2
@angular/compiler: 4.0.2
@angular/core: 4.0.2
@angular/forms: 4.0.2
@angular/http: 4.0.2
@angular/platform-browser: 4.0.2
@angular/platform-browser-dynamic: 4.0.2
@angular/router: 4.0.2
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.2
Repro steps.
- ng new simple_project
- ng serve
- ng g service TestService
- Create an exportable interface in an other file : ITest with a property first
- Implement the ITest interface in TestService
- Inject the TestService into the AppComponent constructor
- Import the interface created into the AppComponent
- Create a new instance of the TestService and store the instance into a variable of type ITest (this is useless but into an other project I'm using interface to use some services)
- Make a console.log of the property first from the variable of type ITest (that will work)
- Save all changes and wait the compilation
- Create a new property into the ITest interface (e.g: second)
- In the AppComponent, make a console.log of the property second from the variable of type ITest
- Save changes
- Compilation error appears
The log given by the failure.
ERROR in F:/Projets/Web/simple_project/src/app/app.component.ts (60,19): Property 'second' does not exist on type 'ITest'.
Mention any other details that might be useful.
If we shutdown the CLI and restart with an ng serve that will compile fine and the error disappears.
Metadata
Metadata
Assignees
Labels
No labels