Method and system for realizing Angular response type form control linkage

An implementation method and a technology for implementing a system, which are applied in program control devices, user interface execution, etc., can solve problems such as not knowing how to deal with them, and achieve the effects of reducing workload, promoting application value, and concise code.

Pending Publication Date: 2020-02-07
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF3 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, versions above Angularv7 no longer support this style of writing. When developers encounter the above situation, they may not know how to deal with it, and further improvement is needed.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for realizing Angular response type form control linkage

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0035] The implementation method of the Angular responsive form control linkage of the present invention, the method binds multiple input controls to the same FormControl, when the user enters through the bound input control on the interface, triggers the valueChanges of the FormControl, and the valueChanges monitors the input value. Changes, and at the same time update the displayed values ​​​​of all controls bound under the FormControl to achieve control linkage.

[0036] In the Angular responsive form component, in the hook interface of the component OnInit, after the form is initialized, monitor the FormControl that wants to realize the linkage of multiple controls. Since FormControl has a valueChanges observable object, subscribing to valueChanges realizes the monitoring of FromControl.

[0037] Pass the value entered by the user through the setValue() method of FormControl, and set emitEvent to false as the property of the opt parameter in the setValue() method, so that ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method and a system for realizing Angular response type form control linkage, and belongs to the technical field of front-end Angular technology frameworks. The implementation method for the Angular response type form control linkage comprises the following steps that a plurality of input controls are bound to the same FormControl; when a user inputs through the bound input control on the interface, the valueChanges of FormControl is triggered, the change condition of the input value is monitored by the valueChanges, and meanwhile, the display values of all the controls bound under FormControl are updated. According to the implementation method for Angular response type form control linkage, the compatibility of Angular low-version codes to high versions is improved, operation is easy, workloads can be effectively reduced, and good application and popularization value is achieved.

Description

technical field [0001] The invention relates to the technical field of front-end Angular technology framework, and specifically provides a method and system for realizing linkage of Angular responsive form controls. Background technique [0002] In Angular v7 and above, the use of ngModel input attributes and ngModelChange events with reactive form directives is not supported. If there is a responsive form, we want to get a certain amount, we can either drag the component through the progress bar to get the input data, or enter the data through the input input box. Angular v2~v6 can bind [(ngModel)] and formControlName to both the progress bar and the input box to realize the linkage of input data. However, versions above Angularv7 no longer support this writing method. When developers encounter the above situation, they may not know how to deal with it, and further improvement is needed. Contents of the invention [0003] The technical task of the present invention is t...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/451
CPCG06F9/451
Inventor 周睿刘牧高传集
Owner SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products