Create Angular version (#1)
Convert site to Angular; also reworked contents on solution pages
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<app-page-title title="All Solutions"></app-page-title>
|
||||
<article class="content auto">
|
||||
<h1>All Solutions</h1>
|
||||
<h2>Active Solutions</h2>
|
||||
<app-application-list-item *ngFor="let app of current" [app]="app"></app-application-list-item>
|
||||
<h2>Past Solutions</h2>
|
||||
<app-application-list-item *ngFor="let app of past" [app]="app"></app-application-list-item>
|
||||
</article>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { Component, OnInit } from '@angular/core'
|
||||
|
||||
import { ApplicationService } from '../application.service'
|
||||
import { App } from '../application.types'
|
||||
|
||||
@Component({
|
||||
selector: 'app-application-list',
|
||||
templateUrl: './application-list.component.html'
|
||||
})
|
||||
export class ApplicationListComponent implements OnInit {
|
||||
|
||||
current: App[]
|
||||
|
||||
past: App[]
|
||||
|
||||
constructor(private appService: ApplicationService) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.appService.getApps().subscribe(apps => {
|
||||
this.current = apps.filter(app => app.isActive && !app.noAboutLink)
|
||||
this.past = apps.filter(app => !app.isActive && !app.noAboutLink)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user