I follow the Getting Started instructions for adding Materials for websites, and in step 4 I get the following error:
<script>mdc.autoInit()</script>
-> Uncaught ReferenceError: mdc is not defined at (index):17
As already mentioned, this is an Angular CLI project, so the script is loaded from a file .angular-cli.json:
"scripts": [
"../node_modules/material-components-web/dist/material-components-web.js"
]
Is there any other place in CLI setup, should I upload a file or make a call mdc.autoInit()?
I also reviewed Angular 2 Framework Integration , and this did not help. It does not use the CLI, and it never calls mdc.autoInit().
source
share