Commit 0306ccfc by abraham

abraham

parent 3918be8d
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { Router,ActivatedRoute } from '@angular/router'; import { Router,ActivatedRoute } from '@angular/router';
import * as $ from 'jquery';
@Component({ @Component({
selector: 'app-terms', selector: 'app-terms',
templateUrl: './terms.component.html', templateUrl: './terms.component.html',
...@@ -8,12 +9,14 @@ import { Router,ActivatedRoute } from '@angular/router'; ...@@ -8,12 +9,14 @@ import { Router,ActivatedRoute } from '@angular/router';
export class TermsComponent implements OnInit { export class TermsComponent implements OnInit {
constructor(private router: Router, constructor(private router: Router,
private route: ActivatedRoute) { } private route: ActivatedRoute) {}
ngOnInit() { ngOnInit() {
} }
goToPage(path,data=null){ goToPage(path,data=null){
this.router.navigateByUrl(path,{queryParams:data}); this.router.navigateByUrl(path,{queryParams:data});
document.body.scrollTop = document.documentElement.scrollTop = 0;
} }
onClick(){ onClick(){
let x = document.querySelector("#sec"); let x = document.querySelector("#sec");
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<li><a href="#!">[email protected]</a></li> <li><a href="#!">[email protected]</a></li>
<li><a (click)="goToPage('terms')">Terms of Service</a></li> <li><a (click)="goToPage('terms')">Terms of Service</a></li>
<li><a href="#!"> Privacy Policy</a></li> <li><a (click)="goToPage('privacypolicy')"> Privacy Policy</a></li>
<li><a href="#!">Blogs</a></li> <li><a href="#!">Blogs</a></li>
<!---- <li><a href="#!">Google Play (Android)</a></li>--> <!---- <li><a href="#!">Google Play (Android)</a></li>-->
......
...@@ -14,5 +14,6 @@ export class FooterComponent implements OnInit { ...@@ -14,5 +14,6 @@ export class FooterComponent implements OnInit {
} }
goToPage(path,data=null){ goToPage(path,data=null){
this.router.navigateByUrl(path,{queryParams:data}); this.router.navigateByUrl(path,{queryParams:data});
document.body.scrollTop = document.documentElement.scrollTop = 0;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment