Name change and description of life cycle in Ionic 2

Source: Internet
Author: User

This article briefly summarizes the changes in the life cycle naming in the version of Ionic 2, as well as the interpretation of each event.

The naming and use of the Ionic lifecycle was explained in the previous course, but after the Ionic 2 update to version 30, the framework has changed the global naming of the life cycle, so this article simply collates the new life cycle events and descriptions below.
The Official document address is here.

Event name Event Description
ionviewloaded The page loads and fires. This event occurs when the page is created into the DOM and is executed only once. If the page is cached (ionic is cached by default), the event is not triggered again. Some events in this event can be placed to initialize the page.
Ionviewwillenter The event that will be executed when a page becomes the current active page.
Ionviewdidenter Enters a page and becomes the current activation page, which is executed whether it is entered after the first entry or the cache.
Ionviewwillleave The event that will be executed when the page is not currently active after it is left.
Ionviewdidleave An event that executes when the page finishes leaving the page and becomes a page that is not currently active.
Ionviewwillunload Events that are executed before the page is destroyed and there are elements removed from the page.
Ionviewdidunload Events that are executed after the page is destroyed and there are elements removed from the page.

Name change and description of life cycle in Ionic 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.