fixed CSS references to element instead of class

This commit is contained in:
alecmerdler 2017-02-21 16:21:54 -08:00 committed by Joseph Schorr
parent e59d394491
commit b0cc8d0f19
3 changed files with 20 additions and 15 deletions

View file

@ -28,7 +28,7 @@
<ul>
<li ng-repeat="section in $ctrl.sections"
ng-if="section.index > $ctrl.currentSection.index">
{{ section.title }}
{{ section.component.sectionTitle }}
</li>
</ul>
</div>

View file

@ -27,15 +27,20 @@ export class LinearWorkflowComponent implements ng.IComponentController {
}
public addSection(section: LinearWorkflowSectionComponent): void {
public addSection(component: LinearWorkflowSectionComponent): void {
this.sections.push({
index: this.sections.length,
section: section,
component: component,
});
if (this.sections.length == 1) {
this.sections[0].component.sectionVisible = true;
this.currentSection = this.sections[0];
}
}
public onNextSection(): void {
if (this.currentSection.section.sectionValid) {
if (this.currentSection.component.sectionValid) {
if (this.currentSection.index + 1 >= this.sections.length) {
this.onWorkflowComplete({});
}
@ -52,5 +57,5 @@ export class LinearWorkflowComponent implements ng.IComponentController {
*/
export type SectionInfo = {
index: number;
section: LinearWorkflowSectionComponent;
component: LinearWorkflowSectionComponent;
}