gammapy / gamma-sky

Portal to the gamma-ray sky
http://gamma-sky.net/
MIT License
6 stars 3 forks source link

Some cleanup #86

Closed cdeil closed 7 years ago

cdeil commented 7 years ago
vorugantia commented 7 years ago

The most recent commit puts the version number in the "About" dialog. This is the change that fixed it:

<p *ngIf="(version)">
    Website version: {{version}}
  </p>

The process of subscribing a local variable to JSON content via Http is obviously not instantaneous - it takes some amount of time for Angular to make the fetch process. So before we were getting an error in console because our HTML code wasn't waiting for the JSON data to come in and be assigned to a local variable (renamed version). The *ngIf parameter fixes that, only shows the <p> element once version is a non-null value.

vorugantia commented 7 years ago

Merging this PR for now. I'll do some more code cleanup another day.