The angular-winjs adapter allows for the use of WinJS controls within Angular syntax. It also allows the use of Angular data-binding within WinJS controls. angular-winjs has custom Angular declarative mark-up that is translated into WinJS controls.
API Differences from WinJS
- Instantiating a winJS control
- Accessing the winControl
- New Directives
In WinJS, an element is declared through using the declarative markup:
In the angular-winjs adapter, you would declare an control in Angular declarative syntax, like this
Unlike WinJS, in the angular-winjs adapter, the winControl is not immediately accessible. To be able to access the winControl, you must declaratively pass the winControl into your angular scope like this:
You can then access the winControl like this:
To make some of the functionalities of WinJS controls more accessable, the angular-winjs adapter created some new directives that do not exist in WinJS
For example, a angular-winjs splitView exposes the "pane" and "content" portions of the spliview as their own controls:
<win-split-view-pane>SplitView Navigation Pane</win-split-view-pane>
<win-split-view-content>SplitView Content Area</win-split-view-content>
The win-split-view-pane and win-split-view-content directives do not exist in winJS and were created for the purpose of making the functionaloty of the splitview more accessable in the Angular syntax
Other new directives include <win-list-view-header>, <win-list-layout>, <win-list-view-footer> and <win-tooltip-content>
Further information at GitHub: angular-winjs project.