Back by GET

import { HttpParams } from '@angular/common/http'; let params = new HttpParams().set('id' , id) .set('token' , this.token); // -------------------------------------------------------------------------- import {map} from 'rxjs/operators'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { SharedConstants } from '../../../../shared/shared.constants'; import { HeadersService } from '../../../../core/headers.service'; import { HttpClient, HttpParams } from '@angular/common/http'; import { Globals } from '../../../../globals'; @Injectable() export class PiCalendService{ public header:any; public pathMap:string; public url_pi_calend; public urlPE: string = 'http://'+SharedConstants.api.HOST+'/'+SharedConstants.modulos.PLANNING.name+'/'+SharedConstants.modulos.PLANNING.pages.PLAN_ESTU+'/'; constructor( public _httpClient: HttpClient, public _headersService: HeadersService, private _globals: Globals ){ this.header = this._headersService.buildService(); this.pathMap = 'pi-calend1'; this.url_pi_calend = this._globals.__URL_BACKEND__ + '/'+ this.pathMap + '/api/'+SharedConstants.modulos.PLANNING.name+'/calend/'; } getDataCalendarizacion(Params):Observable<any>{ return this._httpClient.get(this.url_pi_calend+'getDataCalendarizacion', { params: Params }); } updateDataperiodos(Params):Observable<any> { return this._httpClient.post(this.url_pi_calend+'updateDataperiodos',Params,this.header); } } // Back End Node JS-------------------------------------------------------------- 'use strict' function getFunctionName(){ let data = req.query; let id_var = _encryptor.decrypt(data.valor.replace(/ /g,'+')); } module.exports = { getFunctionName }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.