Skip to content

Instantly share code, notes, and snippets.

@jstrimpel
Created June 11, 2015 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jstrimpel/b8ea592b8e31e1c27e17 to your computer and use it in GitHub Desktop.
Save jstrimpel/b8ea592b8e31e1c27e17 to your computer and use it in GitHub Desktop.

addChild(container, component, options)

Add a child component to a parent's container.

Arguments

  1. container (String): Component container to which the child will be added.
  2. component (String): Component to be added.
  3. options (Object):
    • success (Function): Success callback.
    • error (Function): Error callback.
    • index (Number): Insert index for the container. The default is 0.
    • render (Boolean): Whether or not to render the component (only applicable on the client). Default is false.

removeChild(child, options)

Removes a child component from a parent's container.

Arguments

  1. child (Object): The child component to be removed.
  2. options (Object):
    • success (Function): Success callback.
    • error (Function): Error callback.

remove(options)

Removes component instance.

Arguments

  1. options (Object):
    • success (Function): Success callback.
    • error (Function): Error callback.

onChildRemove(child, options)

Callback for parent when a child is removed.

Arguments

  1. child (Object): The child component to be removed.
  2. options (Object):
    • success (Function): Success callback.
    • error (Function): Error callback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment