From 7431206247b0e168197af54bc0ba6a4b5a310d44 Mon Sep 17 00:00:00 2001 From: ajitsinghkaler Date: Wed, 15 Jan 2020 19:45:15 +0530 Subject: [PATCH] refactor(docs-infra): remove unused functions in resources component page (#34756) In resources component there were unused functions removed unused funtions PR Close #34756 --- .../resource/resource-list.component.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/aio/src/app/custom-elements/resource/resource-list.component.ts b/aio/src/app/custom-elements/resource/resource-list.component.ts index 008d3c4539..6d9e4671a3 100644 --- a/aio/src/app/custom-elements/resource/resource-list.component.ts +++ b/aio/src/app/custom-elements/resource/resource-list.component.ts @@ -1,5 +1,4 @@ -import { Component, HostListener, OnInit } from '@angular/core'; -import { PlatformLocation } from '@angular/common'; +import { Component, OnInit } from '@angular/core'; import { Category } from './resource.model'; import { ResourceService } from './resource.service'; @@ -13,26 +12,15 @@ export class ResourceListComponent implements OnInit { categories: Category[]; location: string; - scrollPos = 0; constructor( - location: PlatformLocation, private resourceService: ResourceService) { this.location = location.pathname.replace(/^\/+/, ''); } - href(cat: {id: string}) { - return this.location + '#' + cat.id; - } - ngOnInit() { // Not using async pipe because cats appear twice in template // No need to unsubscribe because categories observable completes. this.resourceService.categories.subscribe(cats => this.categories = cats); } - - @HostListener('window:scroll', ['$event.target']) - onScroll(target: any) { - this.scrollPos = target ? target.scrollTop || target.body.scrollTop || 0 : 0; - } }