"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/material-examples/datepicker-custom-header/datepicker-custom-header-example.ts" between
material2-7.3.4.tar.gz and material2-7.3.5.tar.gz

About: material2 offers Material Design components for Angular.

datepicker-custom-header-example.ts  (material2-7.3.4):datepicker-custom-header-example.ts  (material2-7.3.5)
import { import {
ChangeDetectionStrategy, ChangeDetectionStrategy,
ChangeDetectorRef, ChangeDetectorRef,
Component, Component,
Host,
Inject, Inject,
OnDestroy OnDestroy
} from '@angular/core'; } from '@angular/core';
import {MatCalendar} from '@angular/material'; import {MatCalendar} from '@angular/material';
import {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/c ore'; import {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/c ore';
import {Subject} from 'rxjs'; import {Subject} from 'rxjs';
import {takeUntil} from 'rxjs/operators'; import {takeUntil} from 'rxjs/operators';
/** @title Datepicker with custom calendar header */ /** @title Datepicker with custom calendar header */
@Component({ @Component({
skipping to change at line 69 skipping to change at line 68
<mat-icon>keyboard_arrow_right</mat-icon> <mat-icon>keyboard_arrow_right</mat-icon>
<mat-icon>keyboard_arrow_right</mat-icon> <mat-icon>keyboard_arrow_right</mat-icon>
</button> </button>
</div> </div>
`, `,
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class ExampleHeader<D> implements OnDestroy { export class ExampleHeader<D> implements OnDestroy {
private destroyed = new Subject<void>(); private destroyed = new Subject<void>();
constructor(@Host() private calendar: MatCalendar<D>, constructor(
private dateAdapter: DateAdapter<D>, private calendar: MatCalendar<D>, private dateAdapter: DateAdapter<D>,
@Inject(MAT_DATE_FORMATS) private dateFormats: MatDateFormats, @Inject(MAT_DATE_FORMATS) private dateFormats: MatDateFormats, cdr: Change
cdr: ChangeDetectorRef) { DetectorRef) {
calendar.stateChanges calendar.stateChanges
.pipe(takeUntil(this.destroyed)) .pipe(takeUntil(this.destroyed))
.subscribe(() => cdr.markForCheck()); .subscribe(() => cdr.markForCheck());
} }
ngOnDestroy() { ngOnDestroy() {
this.destroyed.next(); this.destroyed.next();
this.destroyed.complete(); this.destroyed.complete();
} }
 End of changes. 2 change blocks. 
5 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)