Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular Material with Angular 4

Are there any options to use Angular Material with new Angular 4?

Official material.angularjs.org says:

Angular Material recently released Version 1 which we consider to be stable and ready for production use. Developers should note that Angular Material v1 works only with Angular 1.x.

And with regard to Angular 2:

Angular Material v2 development is also in progress at the angular/material2 GitHub repository

What about Angular 4? Do you think we can bind somehow Angular 1.x and Angular 4 in one project to bring Angular 4 new features and keep using the awesome Angular Material framework?

like image 713
Herman Marvel Avatar asked Mar 26 '17 10:03

Herman Marvel


People also ask

Can AngularJS use angular 7 material?

Angular Material 7 is a UI component library for Angular developers. Angular Material components help in constructing attractive, consistent, and functional web pages and web applications while adhering to modern web design principles like browser portability, device independence, and graceful degradation.

Does angular 8 use angular materials?

Angular Interview Q & A seriesAngular Material provides a huge collection of high-quality and ready-made Angular component based on Material design. Let us learn how to include Angular material in Angular application and use its component.

Can we use material UI with angular?

Material UI and Angular Material are both implementation of google material design. But Material UI is for react, while Angular Material is for Angular. Show activity on this post. Since Material Design Lite does not have any dependency, it's going to be easy to set up.


2 Answers

You can refer to the Getting Started guide from here. This documentation is updated to support angular v4.0.0

Some Material components depend on the Angular animations module in order to be able to do more advanced transitions. If you want these animations to work in your app, you have to install the @angular/animations module and include the BrowserAnimationsModule in your app from @angular/platform-browser/animations.

like image 136
Sanket Avatar answered Sep 22 '22 19:09

Sanket


In December 2016, when the Angular team was running around telling everyone to stop saying "Angular 2" and just say "Angular", I kind of thought it was silly marketing stuff.

In reading through questions on this site, however, I am beginning to see the rational for their plea. Angular 1.x to Angular 2 represented a complete rewrite, an entirely re-architected framework that broke just about everything. Adding to this is the switch to semver, which meant that new major versions numbers would be coming more rapidly.

In short, what I think they were trying to head off was the line of thinking that "Angular 4 is to Angular 2 as Angular 2 was to Angular 1", which is definitely not true.

This perception problem is also what led them to code name 4.0 "invisible makeover".

So, when you see packages that are designed for Angular2, most of them will probably work also with Angular 4. And if there are ng4 changes that break those packages, you will either quickly see releases to address those... or you'll have your answer about whether that package is well-maintained enough to use in your project.

like image 39
IndyWill Avatar answered Sep 22 '22 19:09

IndyWill