src/app/pages/home/home.component.ts
selector | framadate-home |
styleUrls | ./home.component.scss |
templateUrl | ./home.component.html |
Properties |
Methods |
constructor(config: ConfigService)
|
||||||
Defined in src/app/pages/home/home.component.ts:12
|
||||||
Parameters :
|
ngOnInit |
ngOnInit()
|
Defined in src/app/pages/home/home.component.ts:17
|
Returns :
void
|
checkValidity |
checkValidity()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:21
|
Returns :
boolean
|
displayErrorMessage |
displayErrorMessage()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:27
|
Returns :
boolean
|
ngOnInit |
ngOnInit()
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:17
|
Returns :
void
|
Public config |
Type : ConfigService
|
Defined in src/app/pages/home/home.component.ts:13
|
nextStep |
Type : string
|
Default value : '/step/answers'
|
Defined in src/app/pages/home/home.component.ts:12
|
Public config |
Type : ConfigService
|
Inherited from
BaseComponent
|
Defined in
BaseComponent:14
|
import {Component, OnInit} from '@angular/core';
import {ConfigService} from "../../services/config.service";
import {BaseComponent} from "../base-page/base.component";
@Component({
selector: 'framadate-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.scss']
})
export class HomeComponent extends BaseComponent implements OnInit {
nextStep = '/step/answers';
constructor(public config: ConfigService) {
super(config);
}
ngOnInit() {
}
}
<div class="description" >
<router-outlet ></router-outlet >
<h1 i18n >
{{"creation.title"|translate}}
</h1 >
<span
class="pre-selector"
i18n
>
{{"creation.want"|translate}}
</span >
<button
(click)='config.resetConfig()'
class='btn btn--warning' >
Reset all
</button >
<select
[(ngModel)]="config.pollType"
autofocus="autofocus"
id="selector"
name='polltype'
>
<option
value="dates"
name='polltype_date' >
{{"creation.kind.date"|translate}}
</option >
<option
value="classic"
name='polltype_classic' >
{{"creation.kind.classic"|translate}}
</option >
</select >
<span class="post-selector" >
</span >
<div >
<label
class="title-label"
for="poll_title"
i18n
>
{{"creation.choose_title"|translate}}
</label >
<input
[(ngModel)]="config.title"
id="poll_title"
name="poll_title"
placeholder="{{'creation.choose_title_placeholder'|translate}}"
type="name"
>
<framadate-erasable-input [(inputModel)]="config.title" ></framadate-erasable-input >
</div >
<div >
<label for="my_name" >
{{"creation.name"|translate}} :
</label >
<input
[(ngModel)]="config.myName"
id="my_name"
name="my_name"
placeholder="{{'creation.name_placeholder'|translate}}"
type="name"
>
<framadate-erasable-input [(inputModel)]="config.myName" ></framadate-erasable-input >
</div >
<div >
<label
class="title-label"
for="poll_description"
i18n
>
{{"creation.description"|translate}}:
<framadate-erasable-input [(inputModel)]="config.description" ></framadate-erasable-input >
</label >
<br >
<textarea
[(ngModel)]="config.description"
cols="50"
id="poll_description"
lines="5"
name="poll_description"
placeholder="description"
></textarea >
</div >
<div >
<label for="email" >
Mon email pour administrer le sondage est
</label >
<input
[(ngModel)]="config.myEmail"
autofocus="autofocus"
id="email"
name="mail"
required="required"
type="email"
/>
<framadate-erasable-input [(inputModel)]="config.myEmail" ></framadate-erasable-input >
</div >
<button
[routerLink]="'/step/answers'"
class="btn btn--primary btn--full"
*ngIf="config.pollType == 'classic'"
i18n
>
Continuer
<i class='fa fa-file-text' ></i >
</button >
<button
[routerLink]="'/step/date'"
class="btn btn--primary btn--full"
*ngIf="config.pollType == 'dates'"
i18n
>
Continuer
<i class='fa fa-calendar-check-o' ></i >
</button >
<a
[routerLink]="'/step/creation'"
class="prev"
i18n
>
Retour
</a >
<hr >
</div >
./home.component.scss