-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed

Description
Versions
Angular CLI: 6.0.3
Node: 10.1.0
OS: darwin x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.6.3
@angular-devkit/core 0.6.3
@angular-devkit/schematics 0.6.3
@schematics/angular 0.6.3
@schematics/update 0.6.3
rxjs 6.1.0
typescript 2.7.2
Repro steps
- ng new my-new-app --routing
- ng add @angular/material
- npm install
- ng generate @angular/material:material-nav --name=home
- ng serve
Observed behavior
Fails to compile with the following error:
ERROR in src/app/home/home.component.ts(13,3): error TS2322: Type ‘Observable’ is not assignable to type ‘Observable’. Type ‘boolean’ is not assignable to type ‘BreakpointState’.
The code causing the error is the generated code from step 4 above (home.component.ts)
sHandset$: Observable<BreakpointState> = this.breakpointObserver.observe(Breakpoints.Handset)
.pipe(
map(result => result.matches)
);
Desired behavior
ng serve should compile and run the generated application locally without the observed error.
Mention any other details that might be useful (optional)
OS Mac OSX High Sierra
Metadata
Metadata
Assignees
Labels
No labels