Skip to main content

Router Outlet

shadow

Komponenta Router Outlet riadi vkladanie a odoberanie rôznych komponentov stránky na základe aktuálneho stavu routovania aplikácie. Zároveň kontroluje animácie a prechody pri prepínaní medzi stránkami (alebo pohľadmi), čo zvyšuje používateľský zážitok vďaka plynulým vizuálnym zmenám. V podstate funguje ako kontajner dynamického obsahu, ktorý automaticky aktualizuje zobrazený obsah podľa podľa interakcií používateľa.

Life Cycle Hooks

Routes rendered in a Router Outlet have access to specific Ionic events that are wired up to animations

Event NameTrigger
ionViewWillEnterFired when the component routing to is about to animate into view.
ionViewDidEnterFired when the component routing to has finished animating.
ionViewWillLeaveFired when the component routing from is about to animate.
ionViewDidLeaveFired when the component routing to has finished animating.

These event tie into Ionic's animation system and can be used to coordinate parts of your app when a Components is done with its animation. These events are not a replacement for your framework's own event system, but an addition.

For handling Router Guards, the older ionViewCanEnter and ionViewCanLeave have been replaced with their framework specific equivalent. For Angular, there are Router Guards.

Atribúty a Vlastnosti

animation

DescriptionSpecifies the type of animation to apply to child elements as they appear and exit the screen.
Attributeanimation
Typestring
Defaultundefined

Eventy

No events available for this component.

Metódy

No public methods available for this component.

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Vlastnosti

No CSS custom properties available for this component.

Sloty

No slots available for this component.