mat-sidenav and mad-sidenav-container issues with 'TypeError: Cannot read property 'create' of undefined
Bug, feature request, or proposal:
I have created a working app where there are no problems using your StackBlitz templates. However when refactoring my code to use the material components, I am coming up against the problem of console error surrounding the
TypeError: Cannot read property 'create' of undefined at MatSidenav.ngAfterContentInit (sidenav.js:326) at callProviderLifecycles
What is the expected behavior?
Expected behaviour is for this error not to occur such that I can use the component as expect and recreate what I made on StackBlitz
What is the current behavior?
See above for description
StackBlitz and steps to reproduce the issue:
StackBlitz Demo which shows your issue:
Detailed Reproduction Steps:
Basically the problem will be found within app.component.html... Everything is imported correctly and material components can be used as normal. However, the following tags make things fail...
Commenting these and their corresponding closing tags out, you are left with a
What is the use-case or motivation for changing an existing behavior?
Without the sidenav component, my code will need a lot more finessing and changing, and will not work in the way intended with simple material design components.
Which versions of AngularJS, Material, OS, and browsers are affected?
Angular 5 Material 5.1.1 Windows 10 Chrome
Is there anything else we should know? Stack Traces, Screenshots, etc.
@physicsboy Sadly you missed the correct repository. Please have a look here: https://github.com/angular/material2
Bugger - Thanks @IMM0rtalis !!