Skip to content

Commit

Permalink
show raw user output data
Browse files Browse the repository at this point in the history
  • Loading branch information
AmeliePoulain92 committed Feb 20, 2018
1 parent 0016e60 commit 0be81b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ <h1>{{ appTitle }}</h1>
size="invisible"></re-captcha>
<button type="submit" class="form-submit" (click)="captchaRef.execute()" [disabled]="!loginForm.form.valid">Submit</button>
</form>

<div class="user-info" *ngIf="(userInfo | json) != '{}'">
<pre>{{userInfo | json}}</pre>
</div>
</div>

2 changes: 2 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class AppComponent {
public appTitle: string = 'Ng5-test';
public isUserLoggedIn: Boolean = false;
public captchaResponse: string = '';
public userInfo = {};
public apiUrls = {
root: 'https://api.amalyze.com/0.0.12',
login: '/system.user.login'
Expand All @@ -30,6 +31,7 @@ export class AppComponent {
captcha: this.captchaResponse
}).subscribe(res => {
this.isUserLoggedIn = true;
this.userInfo = res['user'];
console.log(res);
});
}
Expand Down

0 comments on commit 0be81b0

Please sign in to comment.