tiers now loading dynamically
This commit is contained in:
parent
d0262c2342
commit
153b710263
1
src/app/championship/championship.component.html
Normal file
1
src/app/championship/championship.component.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<router-outlet></router-outlet>
|
||||||
0
src/app/championship/championship.component.scss
Normal file
0
src/app/championship/championship.component.scss
Normal file
25
src/app/championship/championship.component.spec.ts
Normal file
25
src/app/championship/championship.component.spec.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ChampionshipComponent } from './championship.component';
|
||||||
|
|
||||||
|
describe('ChampionshipComponent', () => {
|
||||||
|
let component: ChampionshipComponent;
|
||||||
|
let fixture: ComponentFixture<ChampionshipComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ ChampionshipComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ChampionshipComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
22
src/app/championship/championship.component.ts
Normal file
22
src/app/championship/championship.component.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import {ChampionshipService} from '../championship.service';
|
||||||
|
import {ActivatedRoute} from '@angular/router';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-championship',
|
||||||
|
templateUrl: './championship.component.html',
|
||||||
|
styleUrls: ['./championship.component.scss']
|
||||||
|
})
|
||||||
|
export class ChampionshipComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor(private route: ActivatedRoute, private championshipService: ChampionshipService) { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
// mark the championservice to set the right championship
|
||||||
|
this.route.paramMap.subscribe(val => {
|
||||||
|
console.log(val);
|
||||||
|
this.championshipService.setChampionship(+val.get('idchampionship'));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user