forked from tykayn/funky-framadate-front
⚡ add component having a couple of configurable links, to navigate between pages
This commit is contained in:
parent
60b4bfb619
commit
da7e96526c
@ -57,6 +57,7 @@ import { NavigationComponent } from './ui/navigation/navigation.component';
|
||||
import { LanguageComponent } from './ui/selector/language/language.component';
|
||||
import { SelectorComponent } from './ui/selector/selector.component';
|
||||
import { ThemeSelectorComponent } from './ui/selector/theme-selector/theme-selector.component';
|
||||
import { TwoLinksComponent } from './ui/navigation/two-links/two-links.component';
|
||||
|
||||
export class MyMissingTranslationHandler implements MissingTranslationHandler {
|
||||
handle(params: MissingTranslationHandlerParams) {
|
||||
@ -106,6 +107,7 @@ export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
||||
ThemeSelectorComponent,
|
||||
MasterHeadComponent,
|
||||
LanguageComponent,
|
||||
TwoLinksComponent,
|
||||
],
|
||||
imports: [
|
||||
ConfirmDialogModule,
|
||||
|
8
src/app/ui/navigation/two-links/two-links.component.html
Normal file
8
src/app/ui/navigation/two-links/two-links.component.html
Normal file
@ -0,0 +1,8 @@
|
||||
<div class="two-links">
|
||||
<a [routerLink]="nextRouteConfig" class="next">
|
||||
C'est parfait!
|
||||
</a>
|
||||
<a [routerLink]="previousRouteConfig" class="prev">
|
||||
Retour
|
||||
</a>
|
||||
</div>
|
24
src/app/ui/navigation/two-links/two-links.component.spec.ts
Normal file
24
src/app/ui/navigation/two-links/two-links.component.spec.ts
Normal file
@ -0,0 +1,24 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TwoLinksComponent } from './two-links.component';
|
||||
|
||||
describe('TwoLinksComponent', () => {
|
||||
let component: TwoLinksComponent;
|
||||
let fixture: ComponentFixture<TwoLinksComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [TwoLinksComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TwoLinksComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
15
src/app/ui/navigation/two-links/two-links.component.ts
Normal file
15
src/app/ui/navigation/two-links/two-links.component.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'framadate-two-links',
|
||||
templateUrl: './two-links.component.html',
|
||||
styleUrls: ['./two-links.component.scss'],
|
||||
})
|
||||
export class TwoLinksComponent implements OnInit {
|
||||
@Input() nextRouteConfig;
|
||||
@Input() previousRouteConfig;
|
||||
|
||||
constructor() {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
}
|
Loading…
Reference in New Issue
Block a user