Search Results for

    Show / Hide Table of Contents

    Worker site components

    A worker site component is a reusable AngularJS directive that runs in a worker site. Components let you extend a worker site with custom UI and behavior — loading third-party scripts, overriding styles, defining shared templates, or building rich interactions — using the worker site APIs available to other Casewhere components.

    Unlike a custom widget, which a designer places on a specific page, a worker site component is enabled per worker site and applies to the whole site rather than a single page.

    What you can build

    Worker site components are flexible. Common uses include:

    • Load external libraries and assets. Pull in third-party JavaScript or apply style overrides for a worker site.
    • Share templates. Define a template once and reference it elsewhere. For example, a grid widget can use a worker site component as its custom row template by referencing the component's ID.
    • Wrap a Casewhere page as a directive. Build a directive that includes a Casewhere page so it can be reused — for example, inside a form or another component.
    • Access data. Like widgets and workflows, components can read from data sources.

    Manage worker site components

    In Casewhere Admin, navigate to Worker Site Components to create, edit, and manage components. Like other Casewhere resources, worker site components belong to a product; use the Product drop-down to filter the list to a specific product.

    Attach a component to worker sites

    A worker site component only runs on the worker sites it is attached to. To enable a component:

    1. Open the component to show its edit view.
    2. In the Worker Sites drop-down, select the worker sites that should use the component.
    3. Click Save and Close.

    Repeat for each component you want to enable on a worker site.

    Use Casewhere APIs in a component

    Worker site components are implemented as AngularJS directives, so they can inject and use Casewhere worker services. See Worker site API for the available services and filters, and for how to inject a service into a directive.

    In This Article
    Back to top Generated by DocFX