Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ngOnInit() {
- this.usuario = localStorage.getItem("user");
- this.entityCtrl.getEntityByUser(localStorage.getItem("user")).subscribe(
- response => {
- this.entidadesTodos = response["body"];
- this.entidad = this.entidadesTodos[0]["id"];
- localStorage.setItem("entidad", this.entidad.toString());
- },
- (error: any) => {
- console.log(error);
- }
- );
- this.entityCtrl
- .getGroupsByEntityAndUser(
- localStorage.getItem("entidad"),
- localStorage.getItem("user")
- )
- .subscribe(
- response => {
- this.groupsTodos = response["body"];
- this.grupo = this.groupsTodos[0]["id"];
- localStorage.setItem("grupo", this.grupo.toString());
- },
- (error: any) => {
- console.log(error);
- }
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement