🚨 Announcing Vendure v2 Beta

addActionBarItem

addActionBarItem

Adds a button to the ActionBar at the top right of each list or detail view. The locationId can be determined by inspecting the DOM and finding the element and its data-location-id attribute.

This should be used in the NgModule providers array of your ui extension module.

Example

@NgModule({
  imports: [SharedModule],
  providers: [
    addActionBarItem({
     id: 'print-invoice'
     label: 'Print Invoice',
     locationId: 'order-detail',
     routerLink: ['/extensions/invoicing'],
    }),
  ],
})
export class MyUiExtensionModule {}

Signature

function addActionBarItem(config: ActionBarItem): Provider

Parameters

config

parameter