commit 9fbbbad4e4fd73a2ecab9b3b39a46634f58d4732
parent 077859daeb651bb3c7489a0447020e23a4d4e97a
Author: MTRNord <mtrnord1@gmail.com>
Date: Sun, 18 Mar 2018 17:14:38 +0100
Still not working. Using a tag and add debug
Diffstat:
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/app/tweet-list/tweet-list.component.html b/src/app/tweet-list/tweet-list.component.html
@@ -8,14 +8,14 @@
</span>
</div>
<div style="z-index: 2;">
- <button (click)="goTo('#img'+i)" >
+ <a (click)="goTo('#img'+i)" >
<img *ngIf="item.image_urls && item.image_urls[0]" [src]="item.image_urls[0]" class="thumbnail">
- </button>
+ </a>
<!-- lightbox container hidden with CSS -->
- <button (click)="goTo('#_')" class="lightbox" [id]="'#img'+i">
+ <a (click)="goTo('#_')" class="lightbox" [id]="'#img'+i">
<img src="http://insomnia.rest/images/screens/main.png">
- </button>
+ </a>
<div class="text">
<h3>{{item.display_name}}</h3>
diff --git a/src/app/tweet-list/tweet-list.component.ts b/src/app/tweet-list/tweet-list.component.ts
@@ -1,4 +1,4 @@
-import {Component, ElementRef, Inject, Input, OnInit, ViewChild} from '@angular/core';
+import {Component, Inject, Input, OnInit} from '@angular/core';
import * as Raven from 'raven-js';
import {ApiService, TweetsEntity} from '../api.service';
import {Observable} from 'rxjs/Observable';
@@ -34,6 +34,7 @@ export class TweetListComponent implements OnInit {
}
public goTo(anchor: string): void {
+ console.log(anchor);
const pageScrollInstance: PageScrollInstance = PageScrollInstance.simpleInstance(this.document, anchor);
this.pageScrollService.start(pageScrollInstance);
}