Skip to content

Commit

Permalink
fix(module: mobile site): correct component name in mobile site (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisherspy committed May 6, 2019
1 parent 4ff06d9 commit f106942
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/site/_site/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ export class AppComponent implements OnInit, AfterViewInit {
}

if (event && event['url'] && event['url'].split('/')[2]) {
this.demoTitle = event['url'].split('/')[2];
this.demoTitle = this.demoTitle.substring(0, 1).toUpperCase() + this.demoTitle.substring(1);
const demoTitleArray = event['url'].split('/')[2].split('-');
this.demoTitle = '';
for (let i = 0; i < demoTitleArray.length; ++i) {
this.demoTitle += demoTitleArray[i].substring(0, 1).toUpperCase() + demoTitleArray[i].substring(1);
}
}
if (event instanceof NavigationEnd) {
const currentDemoComponent = this.componentList.find(component => `/${component.path}` === this.router.url);
Expand Down

0 comments on commit f106942

Please sign in to comment.