profile + i18n

This commit is contained in:
Lurkars
2021-03-18 15:12:30 +01:00
parent 0b4fe16b8e
commit 3e26f43177
16 changed files with 184 additions and 349 deletions
+35
View File
@@ -0,0 +1,35 @@
import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Router, ParamMap} from '@angular/router';
import {ProfileService} from '../../services/profile.service';
@Component({
selector: 'app-user',
templateUrl: './user.component.html',
styleUrls: ['./user.component.scss']
})
export class UserComponent implements OnInit {
username;
profileFields = [];
error = false;
success = false;
constructor(
private profileService: ProfileService,
private router: Router,
private route: ActivatedRoute) {}
async ngOnInit() {
this.username = this.route.snapshot.paramMap.get('username');
this.profileService.getAllForUser(this.username).subscribe((data: any) => {
this.profileFields = data;
this.success = true;
}, error => {
this.error = error;
})
}
}