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

35 lines
844 B
TypeScript
Raw Normal View History

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