Angular wrap around Materialize library
📦 Repository as been renamed from ng2-materialize
to ngx-materialize
🆖 Angular has been updated to 6.0.0
along with RxJs 6.0.0
🚀 Version has been bumped to 6.0.0
to be aligned with Angular
Be sure to follow the README.md for installation if needed.
ng2-materialize
and install ngx-materialize
onClose
output property has been renamed to close
open
exposed method has been renamed to openModal
close
exposed method has been renamed to closeModal
onUpdate
output property has been renamed to update
Properties backgroundClass
and textClass
have been removed on mz-card
component. This is breaking change for those using the grid system (classes such as col s12
) directly on mz-card
as it adds margin and padding to the applied element. Therefore it would now need to be wrapped into a container to apply the grid classes, the same way it should be done with pure Materialize card.
So it will now need to be used like this...
<div class="col s12">
<mz-card class="blue-grey darken-1 white-text">
<mz-card-content>
Great Content Here.
</mz-card-content>
</mz-card>
</div>
You can now import individual component module in your application. Each component module name is specified in demo pages. You can see an example below on how to use component modules:
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
+ import { MzButtonModule, MzInputModule } from 'ng2-materialize';
import { HomeComponent } from './home.component';
@NgModule({
imports: [
CommonModule,
+ MzButtonModule,
+ MzInputModule,
],
declarations: [ HomeComponent ],
})
export class HomeModule { }
You can still import MaterializeModule to make all component availables but it is deprecated and will be removed in a near future.