Skip to content
Snippets Groups Projects
Commit c99067d1 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

Add On Push change detection strategy on each component

parent 3466619a
No related branches found
No related tags found
1 merge request!3Develop
Showing
with 35 additions and 19 deletions
......@@ -10,6 +10,7 @@
"prefix": "dlcm",
"schematics": {
"@schematics/angular:component": {
"changeDetection": "OnPush",
"style": "scss"
}
},
......
import {Component, EventEmitter, OnInit, Output} from '@angular/core';
import {ChangeDetectionStrategy, Component, EventEmitter, OnInit, Output} from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms';
import {distinctUntilChanged} from 'rxjs/internal/operators/distinctUntilChanged';
import {debounceTime} from 'rxjs/operators';
......@@ -8,6 +8,7 @@ import {debounceTime} from 'rxjs/operators';
selector: 'dlcm-search',
templateUrl: './search.component.html',
styleUrls: ['./search.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class SearchComponent implements OnInit {
searchForm: FormGroup;
......
import {Component, OnInit} from '@angular/core';
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
import {SearchDip} from '@app/access/access.action';
import {AccessStateModel} from '@app/access/access.state';
import {DipModel} from '@app/generated-api';
......@@ -10,6 +10,7 @@ import {Observable} from 'rxjs';
selector: 'dlcm-access-view',
templateUrl: './access-view.component.html',
styleUrls: ['./access-view.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AccessViewComponent implements OnInit {
@Select((state) => ((state.access) as AccessStateModel).isLoading) isLoading$: Observable<boolean>;
......
import { Component, OnInit } from '@angular/core';
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
@Component({
selector: 'dlcm-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.scss']
styleUrls: ['./footer.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class FooterComponent implements OnInit {
constructor() { }
constructor() {
}
ngOnInit() {
}
......
import {Component} from '@angular/core';
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {OAuthService} from 'angular-oauth2-oidc';
@Component({
selector: 'dlcm-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HomeComponent {
......
import {Component, OnInit} from '@angular/core';
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
import {OAuthService} from 'angular-oauth2-oidc';
@Component({
selector: 'dlcm-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class LoginComponent implements OnInit {
......
import { Component, OnInit } from '@angular/core';
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
@Component({
selector: 'dlcm-page-not-found',
templateUrl: './page-not-found.component.html',
styleUrls: ['./page-not-found.component.scss']
styleUrls: ['./page-not-found.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PageNotFoundComponent implements OnInit {
constructor() { }
constructor() {
}
ngOnInit() {
}
......
import {Component, EventEmitter, OnInit, Output} from '@angular/core';
import {ChangeDetectionStrategy, Component, EventEmitter, OnInit, Output} from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
@Component({
selector: 'dlcm-create-deposit-component',
templateUrl: './create-deposit.component.html',
styleUrls: ['./create-deposit.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CreateDepositComponent implements OnInit {
createDepositForm: FormGroup;
......
import {Component, Input, OnInit} from '@angular/core';
import {ChangeDetectionStrategy, Component, Input, OnInit} from '@angular/core';
import {DepositsModel} from '@app/generated-api';
@Component({
selector: 'dlcm-deposit-detail',
templateUrl: './deposit-detail.component.html',
styleUrls: ['./deposit-detail.component.scss']
styleUrls: ['./deposit-detail.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DepositDetailComponent implements OnInit {
@Input()
deposit: DepositsModel;
constructor() { }
constructor() {
}
ngOnInit() {
}
......
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {DepositsModel} from '@app/generated-api';
import {PrimeNgColumnsModel} from '@app/shared/model/prime-ng-columns.model';
......@@ -7,6 +7,7 @@ import {PrimeNgColumnsModel} from '@app/shared/model/prime-ng-columns.model';
selector: 'dlcm-table-deposits',
templateUrl: './table-deposits.component.html',
styleUrls: ['./table-deposits.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TableDepositsComponent implements OnInit {
@Input()
......
import { Component, OnInit } from '@angular/core';
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
@Component({
selector: 'dlcm-create-deposit-view',
templateUrl: './create-deposit-view.component.html',
styleUrls: ['./create-deposit-view.component.scss']
styleUrls: ['./create-deposit-view.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CreateDepositViewComponent implements OnInit {
......
import {Component, OnInit} from '@angular/core';
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {GetById} from '@app/deposit/deposit.action';
import {DepositStateModel} from '@app/deposit/deposit.state';
......@@ -10,6 +10,7 @@ import {Observable} from 'rxjs';
selector: 'dlcm-deposit-detail-view',
templateUrl: './deposit-detail-view.component.html',
styleUrls: ['./deposit-detail-view.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DepositDetailViewComponent implements OnInit {
@Select((state) => ((state.deposit) as DepositStateModel).isLoading) isLoading$: Observable<boolean>;
......
import {Component, OnInit} from '@angular/core';
import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core';
import {MatDialog} from '@angular/material';
import {GetAll} from '@app/deposit/deposit.action';
import {DepositStateModel} from '@app/deposit/deposit.state';
......@@ -13,6 +13,7 @@ import {Observable} from 'rxjs';
selector: 'dlcm-deposit-view',
templateUrl: './deposit-view.component.html',
styleUrls: ['./deposit-view.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DepositViewComponent implements OnInit {
faCoffee = faCoffee;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment