How To
Documentation
    Learn More

      content:form

      Description

      Creates a form, all inputs into the form are attached to a variable called model.

      Adding a platform to the form will send the request to the Platform Store API and create the model as a new result .

      Usage

      as element:
      <content:form
             [platform="{string}"]
             [legend="{string}"]
             [action="{string}"]
             [content="{Object}"]>
      </content:form>

      Directive info

      • This directive creates new scope.

      Parameters

      ParamTypeDetails
      platform
      (optional)
      string

      The platform to post the data to.

      legend
      (optional)
      string

      Text to display in the legend of the form.

      action
      (optional)
      string

      Whether the form should be creating a new record (store) or updating an existing record (update). Default:store, options store or update

      content
      (optional)
      Object

      Key value pair object or result to map the form data to.

      Events

      • contentFormPostError

        When the content form is posted to the API unsuccessfully this event will be broadcasted with the error received from the API.

        Type:

        broadcast

        Target:

        root scope
      • contentFormPostSuccess

        When the content form is posted to the API successfully this event will be broadcasted with the model sent to the API.

        Type:

        broadcast

        Target:

        root scope

      Example

      Source