正式使用 Angular Material 和 Angular

Using Angular Material with Angular Formly

我正在使用 Angular Formly (https://github.com/formly-js/ng-formly) and don't know how to give it an Angular Material (https://github.com/angular/material2) 构建一个 Angular2/4 应用看

AngularJS + angular-formly (http://angular-formly.com) + AngularJS Material trio it used to work as seen in the formly docs (http://angular-formly.com/#!/example/integrations/angular-material):

var app = angular.module('formlyExample', ['formly', 'ngAria', 'ngAnimate', 'ngMaterial']);

但这看起来像使用 Angular2 和相应版本的 formly 吗?

(我安装了 material2 并导入了所有必要的组件模块。)

You need to install formly-material template separately.

npm install @ngx-formly/material --save

Just follow all the steps specified here, notice step 2 and it will work.