Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onSubmit(form:NgForm) {
- this.subscription = this._validation.validation({
- cell_no: form.value.cell_no, pass: form.value.password,
- username: this._common.getConnData().username, password:this._common.getConnData().password
- })
- .subscribe(res => {
- if(typeof res == 'string') // invalid access attempt
- {
- this.invalid_access = true;
- }
- else // login successful
- {
- console.log(res);
- }
- })
- validation(data:{})
- {
- const body = JSON.stringify(data);
- const headers = new Headers();
- headers.append('Content-Type', 'application/json');
- return this._http.post(this._common.getBaseUrl()+"doctor_panel_api/validation_modified/format/json",
- body, {headers: headers})
- .map(res => res.json());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement