侧面导航栏不起作用-'ng-template'不是一个已知元素: [英] Side Nav bar not working - 'ng-template' is not a known element:
本文介绍了侧面导航栏不起作用-'ng-template'不是一个已知元素:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遵循了材料中显示的所有步骤.
npm install --save @angular/material
当我尝试使用显示在- https:上的side-nav条组件时: //material.angular.io/components/component/sidenav
我抛出'ng-template'不是一个已知元素'错误.
解决方案
material.io与有角度的材质不同:material.angularjs.org是两个不同的库,因此需要安装和使用:npm install angular-material
>
I followed all the steps that are shown in the material.io
npm install --save @angular/material
When I am trying to use the side-nav bar component that is shown at -https://material.angular.io/components/component/sidenav
I throws 'ng-template' is not a known element' error.
解决方案
material.io is different than angular material: material.angularjs.org, is two different libs, so you need to install, use: npm install angular-material
这篇关于侧面导航栏不起作用-'ng-template'不是一个已知元素:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文