File

src/app/debugger/debugger.component.ts

Implements

OnInit

Metadata

selector framadate-debugger
styleUrls ./debugger.component.scss
templateUrl ./debugger.component.html

Index

Properties
Methods

Constructor

constructor(config: ConfigService)
Parameters :
Name Type Optional
config ConfigService No

Methods

launchToast
launchToast()
Returns : void
ngOnInit
ngOnInit()
Returns : void
selectOption
selectOption(key: string, val: any)
Parameters :
Name Type Optional
key string No
val any No
Returns : boolean

Properties

Public config
Type : ConfigService
formIsValid
Default value : true
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

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""