The tbForm directive is the base to create any form powered by Tubular. Define modelKey to auto-load a record. The serverSaveUrl can be used to create a new or update an existing record.

Please don't bind a controller directly to the tbForm, Angular will throw an exception. If you want to extend the form behavior put a controller in a upper node like a div.

The save method can be forced to update a model against the REST service, otherwise if the Model doesn't detect any change will ignore the save call.

Directive's attributes

Param Type Details
serverUrl string

Set the HTTP URL where the data comes.

serverSaveUrl string

Set the HTTP URL where the data will be saved.

serverSaveMethod string

Set HTTP Method to save data.

model object

The object model to show in the form.

modelKey string

Defines the fields to use like Keys.

formName string

Defines the form name.

requireAuthentication bool

Set if authentication check must be executed, default true.