refactor to define helper service more accurately
This commit is contained in:
1 parent
5527acfb6a
commit
7618e4bf5d
28 files changed
+78
-403
No files matched your search
@@ -6,7 +6,7 @@
|
||||
">
|
||||
</app-parallax>
|
||||
<div class="height-container">
|
||||
<div class="blog-header" [ngStyle]="{'margin-top': isMobile ? '72px' : '112px'}">
|
||||
<div class="blog-header" [ngStyle]="{'margin-top': isNarrow ? '72px' : '112px'}">
|
||||
<h1>Blog</h1>
|
||||
<p class="subtitle">{{ 'BLOG_SUB' | translate }}</p>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {DeviceDetectorService} from '../shared/services/device-detector.service'
|
||||
import {ViewportService} from '../shared/services/viewport.service'
|
||||
import { DatePipe, AsyncPipe, SlicePipe, NgStyle } from '@angular/common';
|
||||
import { ArticleService } from '../shared/services/article.service';
|
||||
import { Router } from '@angular/router';
|
||||
@@ -23,9 +23,9 @@ import {ParallaxComponent} from '../shared/parallax/parallax.component';
|
||||
})
|
||||
export class BlogComponent implements OnInit {
|
||||
articles$: Observable<any[]> | undefined;
|
||||
isMobile: boolean = false;
|
||||
isNarrow: boolean = false;
|
||||
constructor(
|
||||
private deviceService: DeviceDetectorService,
|
||||
private deviceService: ViewportService,
|
||||
private articleService: ArticleService,
|
||||
private router: Router,
|
||||
private titleService: Title
|
||||
@@ -33,7 +33,7 @@ export class BlogComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.titleService.setTitle('Blog | itzMiney')
|
||||
this.isMobile = this.deviceService.isMobile;
|
||||
this.isNarrow = this.deviceService.isNarrow;
|
||||
this.articles$ = this.articleService.getAllArticles();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user