The extra functionality is provided through three mixins.

AbstractRegistrableComponent

This is the core component that contains all of the logic for registring components and handling when they are 'ready'.

Methods

After extending this mixin a couple of methods are added to your component, you can see all of them in the generated documentation. See below for the most common ones!

getChild

  • Description: This method retrieves a child component within your component based on the componentId that's provided when registring it.
  • Parameters
    • componentId
      • type: string
      • required: true
    • componentType
      • type: ComponentType
      • required: false
      • description: To avoid issues you should provide the type of component you are requesting
  • Returns
    • IAbstractRegistrableComponent | IAbstractTransitionComponent | IAbstractPageComponent

hasChild

  • Description: This method checks if a child component exists
  • Parameters
    • componentId
      • type: string
      • required: true
    • componentType
      • type: ComponentType
      • required: false
      • description: To avoid issues you should provide the type of component you are requesting
  • Returns
    • boolean

updateRegistrableComponents

  • Description: This method allows for loading of more async components, use the callback to do your aysnc code and call the release method when you are done, the resolve method will be triggered when the new registrable component are ready
  • Parameters
    • callback
      • type: function
      • parameters:
        • release
          • type: function
      • required: true
  • Returns
    • Promise

AbstractTransitionComponent

This component extends the AbstractRegistrableCompponent and is the component that allows you to trigger transition in methods on your component. It also contains the TransitionController that contains the GreenSock timelines.

Methods

After extending this mixin a couple of methods are added to your component, you can see all of them in the generated documentation. See below for the most common ones!

transitionIn

  • Description: This method allows you to trigger a transitionIn on your component.
  • Parameters
    • forceTransition
      • type: boolean
      • required: false
      • description: If you trigger a transitionIn when the transitionOut is still running by default it will wait for the transitionOut to be complete, if you provide this flag it will force your new transiton.
  • Returns
    • Promise<void>

transitionOut

  • Description: This method allows you to trigger a transitionOut on your component.
  • Parameters
    • forceTransition
      • type: boolean
      • required: false
      • description: If you trigger a transitionOut when the transitionIn is still running by default it will wait for the transitionIn to be complete, if you provide this flag it will force your new transiton.
  • Returns
  • Promise<void>

AbstractPageComponent

This component extends the AbstractTransitionComponent and is the component that changes a default component into a page transition component. It contains information about the flow of the page. becides that it does not add extra functionality to your component!