Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and system for realizing front-end state change management

A state change and implementation method technology, applied in the direction of electrical digital data processing, instruments, calculations, etc., to achieve the effect of consistent style, optimized interface response speed, and improved code quality

Active Publication Date: 2020-04-28
SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF6 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The technical task of the present invention is to provide a front-end state change management implementation method and system to solve the problem of how to realize the logic of refreshing the element state when the interface element changes, and reduce the number of repeated requests to the back-end

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 front-end state change management

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0057] The implementation method of the front-end state change management of the present invention is to share a service in the parent-child component through the angular dependency injection mechanism when the data or button of the front-end interface changes state, and realize the internal state of the parent-child component family through the service Monitoring of change events, parent-child components react, and realize unified management of status changes on the front-end interface. The details of the method are as follows:

[0058] S1. Declare a service that is injected into the module where the parent-child component is located or into the parent component; the details are as follows:

[0059] S101. With the injector inheritance mechanism of Angular DI, the service instance can be shared among parent and child components;

[0060]S102. Declare a corresponding number of Subject objects according to the number of back-end interfaces involved in the state of the front-end...

Embodiment 2

[0079] The implementation system of the front-end state change management of the present invention, the system includes:

[0080] The service creation module is used to declare a service, which is injected into the module where the parent and child components are located or injected into the parent component;

[0081] The Subject object subscription module is used to subscribe to the Subject object in the service when the component is initialized;

[0082] The service instance import module is used for subcomponents to import service instances through constructors;

[0083] The interface element state update module is used to set the loading prompt information or update the intermediate state when requesting the back-end interface. After the successful return, cancel the loading prompt or intermediate state, and update the state of the interface element according to the returned result;

[0084] The subject's monitor cancellation module is used to cancel the monitor of the su...

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 front-end state change management, and belongs to a front-end Angular technology framework. The technical problem to be solved by the invention is how to realize logic of refreshing an element state when an interface element changes, and meanwhile, the times of repeatedly requesting the rear end are reduced; the adopted technical scheme is as follows: the method comprises the following steps: when data of a front-end interface or a button has a state change, a service is shared in father and child components through an anchor dependent injection mechanism, thus monitoring a father and child component home internal state change event through the service; the father and child components respond, and unified management of state change of a front-end interface is achieved. The system comprises a service creation module, a Subject object subscription module, a service instance introduction module, an interface element state updating module and a Subject monitoring cancellation module.

Description

technical field [0001] The invention belongs to the front-end Angular technical framework, and mainly relates to angular component interaction and event monitoring, specifically a method and system for implementing front-end state change management. Background technique [0002] Angular is an excellent front-end framework that is now widely used. Its goal is to enhance browser-based applications through the MVC pattern (MVC), making development and testing easier. The framework adopts and extends traditional HTML, adapting to dynamic content through two-way data binding, two-way data Bindings allow for automatic synchronization between the model and view. [0003] It is a mainstream trend for the front end to add state management to some elements of the interface. Through interface styles and interactive dynamic effects, users can perceive their operations more clearly. After user operation, the changes of page elements can clearly show the current state. But if the user...

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): G06F8/38
CPCG06F8/38Y02D10/00
Inventor 周睿刘牧高传集
Owner SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products