我使用hyperledger composer框架自动创建一个Angular应用程序。此角色应用程序的版本是Angular 4.0.0。
我想使用Angular Material来改进hyperledger composer生成的UI。
为此,我安装了Angular Material,运行命令:
npm install --save @angular/material @angular/cdk
我在控制台中收到以下警告:
npm WARN @angular/cdk@6.1.0 requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/cdk@6.1.0 requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/material@6.1.0 requires a peer of @angular/core@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/material@6.1.0 requires a peer of @angular/common@>=6.0.0-beta.0 <7.0.0 but none is installed. You must install peer dependencies yourself.
据我了解,我有两种选择:
选项1:
将Angular App(由hyperledger composer框架自动生成)从版本4升级到版本6
选项2: 安装与Angular4兼容的旧版Angular Material。
选项1不可行,因为超级边界编写器框架生成的代码不会与Angular6 node_modules的新API混合,对吗?或者API保持不变?
关于选项2:
我试图运行
npm install --save @angular/material@4
为了安装与Angular4兼容的Angular Material版本。但是,我收到以下错误消息:
No matching version found for @angular/material@4
In most cases you or one of your dependencies are requesting
a package version that doesn't exist.
是否可以将Angular Material用于Angular4应用程序?