Skip to content

Commit fa6e4ed

Browse files
committed
docs(project): updated the readme
1 parent e3486bc commit fa6e4ed

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,25 @@ or similar.
253253

254254
#### In the following example, we integration a material input container with `@angular-material-extensions/password-strength` 's component.
255255

256+
NOTE: In order to repaint the mat-form-field correctly after changing the value of the password's strength, please consider
257+
to change the detection strategy for the parent component -->
258+
259+
```typescript
260+
import {ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation} from '@angular/core';
261+
import {Title} from '@angular/platform-browser';
262+
import {MatSlideToggleChange} from '@angular/material';
263+
import {MatPasswordStrengthComponent} from '@angular-material-extensions/password-strength';
264+
265+
@Component({
266+
selector: 'app-home',
267+
templateUrl: './home.component.html',
268+
styleUrls: ['./home.component.scss'],
269+
encapsulation: ViewEncapsulation.None,
270+
changeDetection: ChangeDetectionStrategy.OnPush
271+
})
272+
export class HomeComponent implements OnInit {}
273+
```
274+
256275
```html
257276
<div>
258277
<mat-form-field appearance="outline" style="width: 100%" [color]="passwordComponent.color">

demo/src/app/home/home.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {ChangeDetectionStrategy, Component, OnInit, ViewChild, ViewEncapsulation} from '@angular/core';
1+
import {ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation} from '@angular/core';
22
import {Title} from '@angular/platform-browser';
33
import {MatSlideToggleChange} from '@angular/material';
44
import {MatPasswordStrengthComponent} from '@angular-material-extensions/password-strength';

0 commit comments

Comments
 (0)