Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.22 KB

var.md

File metadata and controls

38 lines (26 loc) · 1.22 KB

lk-var

takes the following attributes:

name

one of name or model is required. Name is a representation of an api request. All '/' are replaced by '.'. A colon (:) is used as a separator between the API resource and the properties in the returned document.

For instance, the title property in this resource:

http://localhost/products/a-product

becomes

products.a-product:title

The http://localhost will be defined in the restangular base url configuration

app.config(function (RestangularProvider) {
    // This defines where our REST API is defined
    RestangularProvider.setBaseUrl('http://127.0.0.1:8000/api/v1');
});

Please check the example file.

model

Angular model. We're assuming this angular model is some nested property where data came from the REST API, otherwise cancel and save buttons will do nothing.

type

By default the type is text.

Full list of available types:

placeholder

Message to be used as placeholder when value is null or empty. Not all elements support this property.