From 8f8a258ecf65d8af5307acf5ed8d2b543c835aae Mon Sep 17 00:00:00 2001 From: ty kayn Date: Mon, 9 Sep 2019 10:57:08 +0200 Subject: [PATCH] :zap: all page components do extend basecomponent and its common config service --- .../create-or-retrieve.component.ts | 10 +++++++--- .../end-confirmation/end-confirmation.component.ts | 10 +++++++--- src/app/pages/home/home.component.ts | 6 +++--- src/app/pages/password/password.component.ts | 10 +++++++--- .../pages/voting-choice/voting-choice.component.ts | 11 ++++++++--- src/app/pages/voting-graph/voting-graph.component.ts | 10 +++++++--- .../pages/voting-summary/voting-summary.component.ts | 10 +++++++--- 7 files changed, 46 insertions(+), 21 deletions(-) diff --git a/src/app/pages/create-or-retrieve/create-or-retrieve.component.ts b/src/app/pages/create-or-retrieve/create-or-retrieve.component.ts index 74792ab6..81dfb0ba 100644 --- a/src/app/pages/create-or-retrieve/create-or-retrieve.component.ts +++ b/src/app/pages/create-or-retrieve/create-or-retrieve.component.ts @@ -1,15 +1,19 @@ import { Component, OnInit } from '@angular/core'; +import {BaseComponent} from "../base-page/base.component"; +import {ConfigService} from "../../config.service"; @Component({ selector: 'framadate-create-or-retrieve', templateUrl: './create-or-retrieve.component.html', styleUrls: ['./create-or-retrieve.component.scss'] }) -export class CreateOrRetrieveComponent implements OnInit { +export class CreateOrRetrieveComponent extends BaseComponent implements OnInit { - constructor() { } + constructor(public config: ConfigService) { + super(config); + } - ngOnInit() { + ngOnInit() { } } diff --git a/src/app/pages/end-confirmation/end-confirmation.component.ts b/src/app/pages/end-confirmation/end-confirmation.component.ts index c6a8febf..2d0752b5 100644 --- a/src/app/pages/end-confirmation/end-confirmation.component.ts +++ b/src/app/pages/end-confirmation/end-confirmation.component.ts @@ -1,15 +1,19 @@ import { Component, OnInit } from '@angular/core'; +import {BaseComponent} from "../base-page/base.component"; +import {ConfigService} from "../../config.service"; @Component({ selector: 'framadate-end-confirmation', templateUrl: './end-confirmation.component.html', styleUrls: ['./end-confirmation.component.scss'] }) -export class EndConfirmationComponent implements OnInit { +export class EndConfirmationComponent extends BaseComponent implements OnInit { - constructor() { } + constructor(public config: ConfigService) { + super(config); + } - ngOnInit() { + ngOnInit() { } } diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index 1e7727ba..597b65bb 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -1,16 +1,16 @@ import {Component, OnInit} from '@angular/core'; import {ConfigService} from "../../config.service"; +import {BaseComponent} from "../base-page/base.component"; @Component({ selector: 'framadate-home', templateUrl: './home.component.html', styleUrls: ['./home.component.scss'] }) -export class HomeComponent implements OnInit { - +export class HomeComponent extends BaseComponent implements OnInit { constructor(public config: ConfigService) { - + super(config); } ngOnInit() { diff --git a/src/app/pages/password/password.component.ts b/src/app/pages/password/password.component.ts index 4b02a1e5..4bbb1ef1 100644 --- a/src/app/pages/password/password.component.ts +++ b/src/app/pages/password/password.component.ts @@ -1,15 +1,19 @@ import { Component, OnInit } from '@angular/core'; +import {BaseComponent} from "../base-page/base.component"; +import {ConfigService} from "../../config.service"; @Component({ selector: 'framadate-password', templateUrl: './password.component.html', styleUrls: ['./password.component.scss'] }) -export class PasswordComponent implements OnInit { +export class PasswordComponent extends BaseComponent implements OnInit { - constructor() { } + constructor(public config: ConfigService) { + super(config); + } - ngOnInit() { + ngOnInit() { } } diff --git a/src/app/pages/voting-choice/voting-choice.component.ts b/src/app/pages/voting-choice/voting-choice.component.ts index 750b2efb..898f8eac 100644 --- a/src/app/pages/voting-choice/voting-choice.component.ts +++ b/src/app/pages/voting-choice/voting-choice.component.ts @@ -1,15 +1,20 @@ import { Component, OnInit } from '@angular/core'; +import {BaseComponent} from "../base-page/base.component"; +import {ConfigService} from "../../config.service"; @Component({ selector: 'framadate-voting-choice', templateUrl: './voting-choice.component.html', styleUrls: ['./voting-choice.component.scss'] }) -export class VotingChoiceComponent implements OnInit { +export class VotingChoiceComponent extends BaseComponent implements OnInit { - constructor() { } + constructor(public config: ConfigService) { + super(config); + } - ngOnInit() { + + ngOnInit() { } } diff --git a/src/app/pages/voting-graph/voting-graph.component.ts b/src/app/pages/voting-graph/voting-graph.component.ts index 0d0e6bd1..725bd1f1 100644 --- a/src/app/pages/voting-graph/voting-graph.component.ts +++ b/src/app/pages/voting-graph/voting-graph.component.ts @@ -1,15 +1,19 @@ import { Component, OnInit } from '@angular/core'; +import {BaseComponent} from "../base-page/base.component"; +import {ConfigService} from "../../config.service"; @Component({ selector: 'framadate-voting-graph', templateUrl: './voting-graph.component.html', styleUrls: ['./voting-graph.component.scss'] }) -export class VotingGraphComponent implements OnInit { +export class VotingGraphComponent extends BaseComponent implements OnInit { - constructor() { } + constructor(public config: ConfigService) { + super(config); + } - ngOnInit() { + ngOnInit() { } } diff --git a/src/app/pages/voting-summary/voting-summary.component.ts b/src/app/pages/voting-summary/voting-summary.component.ts index 92f288b8..7c10d7ad 100644 --- a/src/app/pages/voting-summary/voting-summary.component.ts +++ b/src/app/pages/voting-summary/voting-summary.component.ts @@ -1,15 +1,19 @@ import { Component, OnInit } from '@angular/core'; +import {BaseComponent} from "../base-page/base.component"; +import {ConfigService} from "../../config.service"; @Component({ selector: 'framadate-voting-summary', templateUrl: './voting-summary.component.html', styleUrls: ['./voting-summary.component.scss'] }) -export class VotingSummaryComponent implements OnInit { +export class VotingSummaryComponent extends BaseComponent implements OnInit { - constructor() { } + constructor(public config: ConfigService) { + super(config); + } - ngOnInit() { + ngOnInit() { } }