src/app/debugger/debugger.component.ts
selector | framadate-debugger |
styleUrls | ./debugger.component.scss |
templateUrl | ./debugger.component.html |
Properties |
|
Methods |
constructor(config: ConfigService)
|
||||||
Defined in src/app/debugger/debugger.component.ts:10
|
||||||
Parameters :
|
launchToast |
launchToast()
|
Defined in src/app/debugger/debugger.component.ts:27
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Defined in src/app/debugger/debugger.component.ts:15
|
Returns :
void
|
selectOption |
selectOption(key: string, val: any)
|
Defined in src/app/debugger/debugger.component.ts:18
|
Returns :
boolean
|
Public config |
Type : ConfigService
|
Defined in src/app/debugger/debugger.component.ts:12
|
formIsValid |
Default value : true
|
Defined in src/app/debugger/debugger.component.ts:10
|
import {Component, OnInit} from '@angular/core';
import {ConfigService} from '../services/config.service';
@Component({
selector: 'framadate-debugger',
templateUrl: './debugger.component.html',
styleUrls: ['./debugger.component.scss']
})
export class DebuggerComponent implements OnInit {
formIsValid = true;
constructor(public config: ConfigService) {
}
ngOnInit() {
}
selectOption(key: string, val: any) {
if (!this.config[key]) {
return false;
}
this.config[key] = val;
return true;
}
launchToast() {
this.config.handleError({message: "hop"})
}
}
<div class="well debug" >
<strong >
<h2 i18n >
infos de debug
</h2 >
<span class="demo" >
{{"config.demo"|translate}}
</span >
</strong >
<ul >
<li >
étape actuelle {{config.step}} / {{config.stepMax}}
</li >
<li >
formulaire valide : {{formIsValid}}
</li >
<li >
type de formulaire: {{config.pollType}}
</li >
</ul >
<button
class="btn btn--primary"
i18n
(click)="config.createPoll()"
>
Envoyer le formulaire
</button >
<button
class="btn btn--primary"
i18n
(click)="config.getPollById( '1', 'example password')"
>
get poll 1
</button >
<button
class="btn btn--primary"
i18n
(click)="config.getMyPolls( 'tktest@tktest.com')"
>
get my polls
</button >
<button
class="btn btn--success"
(click)="launchToast()" >
launch success toast
</button >
<a
[routerLink]="'/vote/poll/id/3'"
class="btn btn--success" >
See example of vote page
</a >
</div >
./debugger.component.scss