|
|
|
@ -14,7 +14,7 @@ |
|
|
|
/// limitations under the License.
|
|
|
|
///
|
|
|
|
|
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; |
|
|
|
import { MenuService } from '@core/services/menu.service'; |
|
|
|
import { BreakpointObserver, BreakpointState } from '@angular/cdk/layout'; |
|
|
|
import { MediaBreakpoints } from '@shared/models/constants'; |
|
|
|
@ -25,7 +25,8 @@ import { HomeDashboard } from '@shared/models/dashboard.models'; |
|
|
|
@Component({ |
|
|
|
selector: 'tb-home-links', |
|
|
|
templateUrl: './home-links.component.html', |
|
|
|
styleUrls: ['./home-links.component.scss'] |
|
|
|
styleUrls: ['./home-links.component.scss'], |
|
|
|
changeDetection: ChangeDetectionStrategy.OnPush |
|
|
|
}) |
|
|
|
export class HomeLinksComponent implements OnInit { |
|
|
|
|
|
|
|
@ -37,6 +38,7 @@ export class HomeLinksComponent implements OnInit { |
|
|
|
|
|
|
|
constructor(private menuService: MenuService, |
|
|
|
public breakpointObserver: BreakpointObserver, |
|
|
|
private cd: ChangeDetectorRef, |
|
|
|
private route: ActivatedRoute) { |
|
|
|
} |
|
|
|
|
|
|
|
@ -57,6 +59,7 @@ export class HomeLinksComponent implements OnInit { |
|
|
|
if (this.breakpointObserver.isMatched(MediaBreakpoints['gt-lg'])) { |
|
|
|
this.cols = 4; |
|
|
|
} |
|
|
|
this.cd.detectChanges(); |
|
|
|
} |
|
|
|
|
|
|
|
sectionColspan(section: HomeSection): number { |
|
|
|
|