Should I use material for Angular or material for AngularJS?

Angular The GitHub page shows two pinned stores related to Material Design:

README.md for angular / material is called Material Design for AngularJS Apps .

README.md for angular / material2 is called Material Design for Angular .

I am creating an Angular2 web application using angular-cli and installing and importing @angular/material in app.module.ts .

 import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { HttpModule } from '@angular/http'; import { MaterialModule } from '@angular/material' import { FlexLayoutModule } from '@angular/flex-layout' @NgModule({ declarations: [ AppComponent, ], imports: [ BrowserModule, HttpModule, FlexLayoutModule, MaterialModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { } 

I assume that I should follow the documentation of material.angular.io and not material.angularjs.org ?

Questions:

+7
javascript angular angular-material angular-material2
source share
1 answer

When creating an application with Angular (V2 or +) you should use angular / material2 (github) and the document material.angular.io .

Do not use material.angularjs.org , as is done for AngularJs applications.

As you noticed, there is not much in material2 to handle the layout, and you should use angular / flex-layout .

This is written in repo Readme material2:

enter image description here

By the way, a personal opinion is here, but it's great that they decided to share the layout with the components, so even if you decide to use other components, you can still have a flexible layout thanks to angular / flex-layout.

+9
source share

All Articles