This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class ChipsMultiSelectComponent implements OnInit, ControlValueAccessor { | |
| writeValue(value: string[]): void { | |
| } | |
| registerOnChange(fn: any): void { | |
| } | |
| registerOnTouched(fn: any): void { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mat-chip #c="matChip" *ngFor="let option of options" [value]="option"> | |
| <mat-icon *ngIf="c.selected">check</mat-icon> | |
| {{option}} | |
| </mat-chip> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mat-chip-list selectable multiple> | |
| <mat-chip #c="matChip" *ngFor="let option of options" [value]="option" (click)="toggleSelection(c)"> | |
| {{option}} | |
| </mat-chip> | |
| </mat-chip-list> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mat-chip-list selectable multiple> | |
| <mat-chip #c="matChip" *ngFor="let option of options" [value]="option" (click)="toggleSelection(c)"> | |
| {{option}} | |
| </mat-chip> | |
| </mat-chip-list> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mat-chip-list> | |
| <mat-chip *ngFor="let option of options" [value]="option"> | |
| {{option}} | |
| </mat-chip> | |
| </mat-chip-list> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <a mat-tab-link *ngFor="let tabItem of tabs" | |
| [routerLink]="tabItem.route" | |
| routerLinkActive | |
| #rla="routerLinkActive" | |
| [active]="rla.isActive"> | |
| ... | |
| </a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const routes: Routes = [ | |
| { | |
| path: '', | |
| pathMatch: 'full', | |
| redirectTo: 'one', | |
| }, | |
| { | |
| path: 'one', | |
| loadChildren: () => | |
| import('./section-one/section-one.module').then( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @NgModule({ | |
| declarations: [SectionOneComponent], | |
| imports: [ | |
| CommonModule, | |
| RouterModule.forChild( | |
| [{ path: '', component: SectionOneComponent }] | |
| ), | |
| MatCardModule, | |
| MatButtonModule, | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mat-toolbar color="primary"> | |
| Material Tabs with Lazy Loaded Routes | |
| </mat-toolbar> | |
| <nav mat-tab-nav-bar> | |
| <a mat-tab-link *ngFor="let tabItem of tabs"> | |
| <mat-icon class="mr-8">{{tabItem.icon}}</mat-icon> | |
| {{tabItem.label}} | |
| </a> | |
| </nav> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| checkForCardMatch(): void { | |
| setTimeout(() => { | |
| const cardOne = this.flippedCards[0]; | |
| const cardTwo = this.flippedCards[1]; | |
| const nextState = cardOne.imageId === cardTwo.imageId ? 'matched' : 'default'; | |
| cardOne.state = cardTwo.state = nextState; | |
| this.flippedCards = []; | |