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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com