web-development-server

Sending Variable from Component to Service in Angular 5

…衆ロ難τιáo~ 提交于 2021-02-20 03:49:37
问题 In my current Angular 5 project, I have been making successful API calls from my service (Code kept clean for brevity) myService.ts : @Injectable() export class my-service-service { constructor(private _http: HttpClient) { } myData1() { return this._http.get("API_URL") .map(result => result); } And accessing that information on my connected component by subscribing to the above service. myComponent.ts: import { myServiceService } from './my-service-service.service'; @Component({ ... })

Sending Variable from Component to Service in Angular 5

烂漫一生 提交于 2021-02-20 03:47:01
问题 In my current Angular 5 project, I have been making successful API calls from my service (Code kept clean for brevity) myService.ts : @Injectable() export class my-service-service { constructor(private _http: HttpClient) { } myData1() { return this._http.get("API_URL") .map(result => result); } And accessing that information on my connected component by subscribing to the above service. myComponent.ts: import { myServiceService } from './my-service-service.service'; @Component({ ... })

How to save user input without backend

微笑、不失礼 提交于 2021-02-08 14:34:19
问题 I am just learning JavaScript and web development in general and I was wondering if what I want to do is possible. I would like to write a JavaScript quiz that saves the answers a user inputs without needing a backend. Is this possible? If it is not possible what is the simplest and easiest way I can do this? Thank You PS: If this is not the right place to ask this, please direct me to the place I should be asking this. 回答1: Yes you can either use cookies or localstorage http://developer

Can I do DOM manipulation within an Express POST request?

▼魔方 西西 提交于 2021-01-04 08:44:11
问题 I'm working with basic HTML/CSS frontend, I currently have a landing page with a form on it that sends some data to a database. When the request is done, it is expecting some sort of response. In this case, I am re-rendering the page, however, I want to replace the form with some sort of a thank you message, something so the user knows that it has sent correctly. I have tried the solution of simply having a separate near identical page with the form removed and replaced, however, this kind of

Why is it said that HTTP2 is a binary protocol?

守給你的承諾、 提交于 2020-07-18 16:22:15
问题 I've just read a article about differences between http and http2 differences,but the main question that i have is when tit said that http2 is a binary protocol but http 1 is a textual protocol . Maybe i'm wrong but i know that any data is,text or whatever format it can be has a binray representation form in memory,and even when transfer throught tcp/ip network the data is splitted in a format according the layer(OSI model or TCP/IP model representation) which means that technically textual

Django is synchronous or asynchronous?

拈花ヽ惹草 提交于 2020-06-24 16:56:22
问题 Django is synchronous or asynchronous? I want to know that the Django Framework is Synchronous or Asynchronous. I have heard about the interview problems they ask about the framework you are using is synchronous or asynchronous. So I want to know the meaning of Synchronous and Asynchronous in terms of web development. 回答1: Django itself is synchronous. each HTTP request will be handled completely synchronously. However you have extensions like django-channels ( https://github.com/django

Django is synchronous or asynchronous?

自作多情 提交于 2020-06-24 16:55:40
问题 Django is synchronous or asynchronous? I want to know that the Django Framework is Synchronous or Asynchronous. I have heard about the interview problems they ask about the framework you are using is synchronous or asynchronous. So I want to know the meaning of Synchronous and Asynchronous in terms of web development. 回答1: Django itself is synchronous. each HTTP request will be handled completely synchronously. However you have extensions like django-channels ( https://github.com/django