Wijmo UI for the Web
Widget and Option Directives
Wijmo User Guide > AngularJS Directives > Getting Started with AngularJS > Widget and Option Directives

Here are a few concepts that you can apply to any Wijmo widgets and options that you use with AngularJS.

Creating Widgets

Each widget has a directive with a prefix of "wij-" that you use like an HTML element instead of the combination of HTML elements and jQuery script that we usually use to create widgets. For each widget name, we insert a dash between the wij- prefix and the name of the widget. For example, wij-grid, wij-barchart, wij-radialgauge. Here is sample markup that you can use to create a Calendar widget.

Markup
Copy Code
<wij-calendar></wij-calendar>

 Setting Options

For each option, we insert a dash before any camel cased letters, so that seriesList becomes series-list, maskFormat becomes mask-format.

For child options, we can nest the elements, or if it's just a simple option, it can be used as an attribute of the main element. Some examples include:

Script Version
Copy Code
$("#calendar1").wijcalendar(
    {
        easing: "easeOutExpo"
    }
);

Angular Markup
Copy Code
<wij-calendar easing="easeOutExpo"></wij-calendar>
Script Version
Copy Code
axis:{
    x:{text:"Auto Makers"},
    y:{text:"Percent Increase in Sales", annoFormatString:"p0"}
}

Angular Markup
Copy Code
<axis>
    <x text="Auto Makers"></x> 
    <y text="Percent Increase in Sales" anno-format-string="p0"></y> 
</axis>
See Also