# Reusable Directives The `template` field type allows you to use any HTML tag, including custom directives. ng-admin provides ready-to-use directives to easily add interactions to your admin views: * `` * `` * `` Buttons linking to the related view for the given entry. ```js entity.listView().fields([ // ... nga.field('actions', 'template').template('') ]); ``` * `` * `` A button linking to the related view for the given entity. Note that `` supports default values for the entity to create. This enables the creation of an with a prefilled relationship: ```js post.editionView() .fields([ ... nga.field('').label('') .template('') ]); ``` * `` A button linking to an entity list view, prefiltered. ```js entity.listView().fields([ // ... nga.field('', 'template').label('') template('') ]); ``` ## `listView.listActions()` The `listActions()` method available on the listView is a shortcut to adding a template field with one of the directives listed above. In practice, calling: ```js listView.listActions(['edit', 'delete']); ``` Is equivalent to: ```js var template = '' + '' + '' + ''; listView.fields([ nga.field('actions', 'template').template(template) ]); ``` You can also provide custom label using the `label` attribute: ```js listView.listActions([ '' + '', '' + '' ]); ```