funky-framadate-front/src/app/pages/create-or-retrieve/create-or-retrieve.componen...

35 lines
950 B
TypeScript
Raw Normal View History

import { Component, OnInit } from '@angular/core';
import { BaseComponent } from '../base-page/base.component';
import { ConfigService } from '../../services/config.service';
@Component({
selector: 'framadate-create-or-retrieve',
templateUrl: './create-or-retrieve.component.html',
styleUrls: ['./create-or-retrieve.component.scss'],
})
export class CreateOrRetrieveComponent extends BaseComponent implements OnInit {
2020-01-15 11:40:39 +01:00
loadedMyPolls: boolean = false;
2020-01-15 17:55:22 +01:00
constructor(public config: ConfigService) {
super(config);
}
ngOnInit() {
// if (!environment.production) {
// this.findMyPollsByEmail('tktest@tktest.com')
// }
}
findMyPollsByEmail(email: string) {
2020-01-15 11:40:39 +01:00
if (!email) {
return;
2020-01-15 11:40:39 +01:00
}
2019-12-03 17:20:57 +01:00
this.config.findPollsByEmail(email);
2020-01-15 11:40:39 +01:00
this.loadedMyPolls = true;
}
2020-01-20 14:36:26 +01:00
trackFunction(index: number, item: any): number {
return item.id;
}
}