16.0.2 • Published 8 months ago
ngx-mat-enhanced v16.0.2
🔛 ngx-mat-enhanced
An Angular 16+ library for custom extended Material components
Features
x Medias gallery Component : Upload your files and preview them using an horizontal list
x Breadcrumbs Component
Inside-App Notifications Component
Getting started
ng add @angular/material
npm i -s ngx-mat-enhanced
Components
<button (click)="onDeleteSelected()">delete selection
```typescript
import { Component, ViewChild } from "@angular/core";
import { FormBuilder, FormGroup } from "@angular/forms";
import { MediasService } from "ngx-mat-enhanced";
@Component({
selector: "app-medias",
templateUrl: "./medias.component.html",
styleUrls: ["./medias.component.scss"],
})
export class MediasComponent {
public mediaForm: FormGroup;
public newFile!: File;
constructor(private mediasService: MediasService, private fb: FormBuilder) {
this.mediaForm = this.fb.group({
input: [""],
});
}
onFileInput(event: any) {
const file = event.target.files[0] as File;
this.newFile = file;
this.mediaForm.reset();
}
public onDeleteSelected() {
this.mediasService.deleteSelected();
}
}
public pagePathObject: BreadCrumbOptions = [
{
fullPath: '/',
label: 'Home',
},
{
fullPath: '/test',
label: 'Test page',
},
];
public breadcrumOptions: BreadCrumbOptions = {
type: 'buttons',
buttons: {
activeItemColor: 'primary',
},
separator: {
icon: 'keyboard_arrow_right',
},
};