funky-framadate-front/mocks/old-stuff/pages/create-or-retrieve/create-or-retrieve.component.ts

35 lines
850 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-05-01 19:10:17 +02:00
ngOnInit(): void {
2020-04-21 10:50:26 +02:00
// 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;
}
}