A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.umbraco.com/umbraco-cms/13.latest/reference/angular/directives/umbproperty below:

umbProperty | Umbraco CMS

umbProperty | Umbraco CMS
  1. Reference
  2. AngularJS
  3. Directives
umbProperty

The umb-property directive can along with umb-property-editor be used for rendering property editors in the backoffice.

The two directives are typically used together. For instance, if your Angular model has an array of properties, your view could look something like:

<umb-property property="property" ng-repeat="property in properties">
    <umb-property-editor model="property"></umb-property-editor>
</umb-property>

Properties contains the model for each property. ng-repeat can be used to iterate over each property, passing them to the two directives via property and model attributes.

For a basic property with a textbox, the model for the property can be defined as:

var property = {
    alias: "myProperty",
    label: "My property",
    description: "This is my property.",
    value: "Cupcake ipsum dolor sit amet oat cake marzipan...",
    view: "textbox"
};

The view property specifies the URL to the property editor that should be used for this property. To use one of the built-in property editors in Umbraco, you can specify the alias (eg. textbox) rather than the full URL to the view (eg. /umbraco/Views/propertyeditors/textbox/textbox.html).

You can see a list of all the built-in property editors in the propertyeditors folder on GitHub .


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4