Skip to content

Commit

Permalink
Merge pull request #265 from severinbeauvais/PRC-713
Browse files Browse the repository at this point in the history
PRC-713: changes to make fragment code work
  • Loading branch information
marklise authored Oct 4, 2018
2 parents 782bbab + c780182 commit fad0d26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="top-container" *ngIf="application">
<div class="top-container">
<div class="container">
<div class="title-container">
<div class="title-container__title">
Expand Down Expand Up @@ -26,7 +26,7 @@ <h1><span class="text-muted">Crown land File: {{application['clFile']}} &nbsp;&r
</div>
</div>

<div class="bottom-container" *ngIf="application">
<div class="bottom-container">
<div class="container">
<form class="mb-3" #applicationForm="ngForm">
<fieldset>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ export class ApplicationAddEditComponent implements OnInit, OnDestroy {
router.events.subscribe(event => {
if (event instanceof NavigationEnd) {
const url = router.parseUrl(router.url);
if (url.fragment) {
if (url && url.fragment) {
// ensure element exists
const element = document.querySelector('#' + url.fragment);
const element = document.getElementById(url.fragment);
if (element) {
document.getElementById(url.fragment).scrollIntoView();
element.scrollIntoView();
}
}
}
Expand Down

0 comments on commit fad0d26

Please sign in to comment.