forked from tykayn/funky-framadate-front
hop
This commit is contained in:
parent
40b1a7bbf9
commit
512d569c54
@ -12,7 +12,7 @@
|
|||||||
},
|
},
|
||||||
"root": "",
|
"root": "",
|
||||||
"sourceRoot": "src",
|
"sourceRoot": "src",
|
||||||
"prefix": "app",
|
"prefix": "framadate",
|
||||||
"architect": {
|
"architect": {
|
||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
|
25
messages.xlf
Normal file
25
messages.xlf
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||||
|
<file source-language="en" datatype="plaintext" original="ng2.template">
|
||||||
|
<body>
|
||||||
|
<trans-unit id="a38ca9be0d4cc826d1962ced6959714844cd8b5f" datatype="html">
|
||||||
|
<source>
|
||||||
|
Bienvenue sur Framadate
|
||||||
|
</source>
|
||||||
|
<context-group purpose="location">
|
||||||
|
<context context-type="sourcefile">src/app/app.component.html</context>
|
||||||
|
<context context-type="linenumber">3</context>
|
||||||
|
</context-group>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="9cc3aa4a9c50ffaaed035c7f7d1dbcefb54954ea" datatype="html">
|
||||||
|
<source>
|
||||||
|
Ceci est une démo
|
||||||
|
</source>
|
||||||
|
<context-group purpose="location">
|
||||||
|
<context context-type="sourcefile">src/app/app.component.html</context>
|
||||||
|
<context context-type="linenumber">6</context>
|
||||||
|
</context-group>
|
||||||
|
</trans-unit>
|
||||||
|
</body>
|
||||||
|
</file>
|
||||||
|
</xliff>
|
@ -1,21 +1,11 @@
|
|||||||
<!--The content below is only a placeholder and can be replaced.-->
|
<!--The content below is only a placeholder and can be replaced.-->
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<h1>
|
<h1 i18n>
|
||||||
Welcome to {{ title }}!
|
Bienvenue sur Framadate
|
||||||
</h1>
|
</h1>
|
||||||
<img alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==" width="300">
|
<p i18n>
|
||||||
|
Ceci est une démo
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<h2>Here are some links to help you start: </h2>
|
<framadate-form-container></framadate-form-container>
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<h2><a href="https://angular.io/tutorial" rel="noopener" target="_blank">Tour of Heroes</a></h2>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2><a href="https://angular.io/cli" rel="noopener" target="_blank">CLI Documentation</a></h2>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2><a href="https://blog.angular.io/" rel="noopener" target="_blank">Angular blog</a></h2>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
|
@ -3,14 +3,26 @@ import { NgModule } from '@angular/core';
|
|||||||
|
|
||||||
import { AppRoutingModule } from './app-routing.module';
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
import { FormContainerComponent } from './form-container/form-container.component';
|
||||||
|
import { BasePageComponent } from './pages/base-page/base-page.component';
|
||||||
|
import { PageKindComponent } from './pages/page-kind/page-kind.component';
|
||||||
|
import { HeaderComponent } from './header/header.component';
|
||||||
|
import {FormsModule} from '@angular/forms';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent
|
AppComponent,
|
||||||
|
FormContainerComponent,
|
||||||
|
BasePageComponent,
|
||||||
|
PageKindComponent,
|
||||||
|
HeaderComponent,
|
||||||
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
AppRoutingModule
|
AppRoutingModule,
|
||||||
|
FormsModule,
|
||||||
],
|
],
|
||||||
providers: [],
|
providers: [],
|
||||||
bootstrap: [AppComponent]
|
bootstrap: [AppComponent]
|
||||||
|
19
src/app/form-container/form-container.component.html
Normal file
19
src/app/form-container/form-container.component.html
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<p>form-container works!</p>
|
||||||
|
<div class="description">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="choices">
|
||||||
|
<button *ngDisable="!formIsValid" class="btn btn-primary">
|
||||||
|
suivant
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="well debug">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
étape actuelle {{progressionStep}} / {{progressionStepMax}}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
formulaire valide : {{formIsValid}}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
25
src/app/form-container/form-container.component.spec.ts
Normal file
25
src/app/form-container/form-container.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { FormContainerComponent } from './form-container.component';
|
||||||
|
|
||||||
|
describe('FormContainerComponent', () => {
|
||||||
|
let component: FormContainerComponent;
|
||||||
|
let fixture: ComponentFixture<FormContainerComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ FormContainerComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(FormContainerComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
41
src/app/form-container/form-container.component.ts
Normal file
41
src/app/form-container/form-container.component.ts
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
import {Component, OnInit} from '@angular/core';
|
||||||
|
import {ProgressionService} from '../progression.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'framadate-form-container',
|
||||||
|
templateUrl: './form-container.component.html',
|
||||||
|
styleUrls: ['./form-container.component.scss']
|
||||||
|
})
|
||||||
|
/**
|
||||||
|
* gestion de la progression dans le formulaire.
|
||||||
|
* à chaque étape correspond un composant de page
|
||||||
|
*/
|
||||||
|
export class FormContainerComponent implements OnInit {
|
||||||
|
|
||||||
|
private pollConfig: any;
|
||||||
|
private progressionStep = 0;
|
||||||
|
private progressionStepMax = 0;
|
||||||
|
private formIsValid = true;
|
||||||
|
|
||||||
|
constructor(private progression: ProgressionService) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
nextPage() {
|
||||||
|
if (this.checkValidity()) {
|
||||||
|
this.progressionStep++;
|
||||||
|
} else {
|
||||||
|
this.displayErrorMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
checkValidity() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
displayErrorMessage() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
1
src/app/header/header.component.html
Normal file
1
src/app/header/header.component.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p>(progression)</p>
|
0
src/app/header/header.component.scss
Normal file
0
src/app/header/header.component.scss
Normal file
25
src/app/header/header.component.spec.ts
Normal file
25
src/app/header/header.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { HeaderComponent } from './header.component';
|
||||||
|
|
||||||
|
describe('HeaderComponent', () => {
|
||||||
|
let component: HeaderComponent;
|
||||||
|
let fixture: ComponentFixture<HeaderComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ HeaderComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(HeaderComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
15
src/app/header/header.component.ts
Normal file
15
src/app/header/header.component.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'framadate-header',
|
||||||
|
templateUrl: './header.component.html',
|
||||||
|
styleUrls: ['./header.component.scss']
|
||||||
|
})
|
||||||
|
export class HeaderComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
1
src/app/pages/base-page/base-page.component.html
Normal file
1
src/app/pages/base-page/base-page.component.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p>base-page works!</p>
|
0
src/app/pages/base-page/base-page.component.scss
Normal file
0
src/app/pages/base-page/base-page.component.scss
Normal file
25
src/app/pages/base-page/base-page.component.spec.ts
Normal file
25
src/app/pages/base-page/base-page.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { BasePageComponent } from './base-page.component';
|
||||||
|
|
||||||
|
describe('BasePageComponent', () => {
|
||||||
|
let component: BasePageComponent;
|
||||||
|
let fixture: ComponentFixture<BasePageComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ BasePageComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(BasePageComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
15
src/app/pages/base-page/base-page.component.ts
Normal file
15
src/app/pages/base-page/base-page.component.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'framadate-base-page',
|
||||||
|
templateUrl: './base-page.component.html',
|
||||||
|
styleUrls: ['./base-page.component.scss']
|
||||||
|
})
|
||||||
|
export class BasePageComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
1
src/app/pages/page-kind/page-kind.component.html
Normal file
1
src/app/pages/page-kind/page-kind.component.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<p>page-kind works!</p>
|
0
src/app/pages/page-kind/page-kind.component.scss
Normal file
0
src/app/pages/page-kind/page-kind.component.scss
Normal file
25
src/app/pages/page-kind/page-kind.component.spec.ts
Normal file
25
src/app/pages/page-kind/page-kind.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { PageKindComponent } from './page-kind.component';
|
||||||
|
|
||||||
|
describe('PageKindComponent', () => {
|
||||||
|
let component: PageKindComponent;
|
||||||
|
let fixture: ComponentFixture<PageKindComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ PageKindComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(PageKindComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
15
src/app/pages/page-kind/page-kind.component.ts
Normal file
15
src/app/pages/page-kind/page-kind.component.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'framadate-page-kind',
|
||||||
|
templateUrl: './page-kind.component.html',
|
||||||
|
styleUrls: ['./page-kind.component.scss']
|
||||||
|
})
|
||||||
|
export class PageKindComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
12
src/app/progression.service.spec.ts
Normal file
12
src/app/progression.service.spec.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ProgressionService } from './progression.service';
|
||||||
|
|
||||||
|
describe('ProgressionService', () => {
|
||||||
|
beforeEach(() => TestBed.configureTestingModule({}));
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
const service: ProgressionService = TestBed.get(ProgressionService);
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
9
src/app/progression.service.ts
Normal file
9
src/app/progression.service.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class ProgressionService {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
}
|
0
src/locale/messages.fr.xlf
Normal file
0
src/locale/messages.fr.xlf
Normal file
Loading…
Reference in New Issue
Block a user