Created
January 23, 2018 15:43
-
-
Save balvinder294/06d61c6cc210efdb708b7ecd04810f38 to your computer and use it in GitHub Desktop.
method for getting LoggedIn User details in Jhipster
This file contains hidden or 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
First inject Principal Service in your component | |
this.principal.identity().then((account) => { | |
// get current Account | |
this.currentAccount = account; | |
// get a specific field from account | |
const field = this.currentAccount.field; | |
//call your get method | |
this.getMethod(field); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment