File
Metadata
selector |
framadate-choices-list |
styleUrls |
./choices-list.component.scss |
templateUrl |
./choices-list.component.html |
import {Component} from '@angular/core';
import {ConfigService} from "../../../services/config.service";
@Component({
selector: 'framadate-choices-list',
templateUrl: './choices-list.component.html',
styleUrls: ['./choices-list.component.scss']
})
export class ChoicesListComponent {
constructor(public config: ConfigService) {
}
}
<div
*ngIf='config.currentPoll'
class="list-of-choices" >
<div *ngFor="let choice of config.currentPoll.choices" >
<framadate-voting-choice
[choice]="choice"
[choices_count]="config.currentPoll.choices_count"
[pollIsSpecialDate]="config.currentPoll.poll.kind == 'date'"
[poll]='config.currentPoll' ></framadate-voting-choice >
</div >
</div >
<button
class='btn btn-block submit-votestack'
(click)='config.addVote()'
[disabled]='!config.myTempVoteStack'
[ngClass]='{"btn--primary" : config.myTempVoteStack } '
*ngIf='!config.myVoteStack || !config.myVoteStack.id' >
<i class='fa fa-paper-plane' ></i > Envoyer
</button >
<button
class='btn btn--primary btn-block submit-votestack update'
(click)='config.updateVote(config.myVoteStack)'
*ngIf='config.myVoteStack && config.myVoteStack.id' >
<i class='fa fa-pencil' ></i > Mettre à jour
</button >
.submit-votestack {
position: fixed;
bottom: 5px;
right: 5px;
}
Legend
Html element with directive