user.service.ts 301 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class UserService {
userDetails = {name : "",username:""}
  constructor() { }
public getUsername(){
  return this.userDetails.username
}
public setUsername (username){
  this.userDetails.username = username
}
}