loginObj: Login; constructor(private http: HttpClient) { this.loginObj = new Login(); } onLogin() { this.http.post<any>('http://192.168.1.146/maheshwarisathi.com/login/check_login', this.loginObj ).subscribe( reply => { console.log(reply); }, err => { console.log('error', err); } ); } } export class Login{ username: string; password: string; user_agent:string; constructor() { this.username = ''; this.password = ''; this.user_agent = 'NI-AAPP'; } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter