Last active
January 26, 2017 14:04
-
-
Save rowdyrabouw/15ea7b330c4a3608be30bd3fcc333c70 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<StackLayout> | |
<Label [text]="appVersion"></Label> | |
</StackLayout> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component, OnInit} from "@angular/core"; | |
let appversion = require("nativescript-appversion"); | |
@Component({ | |
selector: "my-app", | |
templateUrl: "app.component.html", | |
}) | |
export class AppComponent implements OnInit { | |
appVersion: string; | |
constructor() { | |
} | |
public ngOnInit() { | |
appversion.getVersionName().then((v) => { | |
console.log("Your app's version is: " + v); | |
this.appVersion = v; | |
}); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JS: Your app's version is: 1.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment