sunbird-sdk-directives
v0.0.3
Published
This library is developed to make [@project-sunbird/telemetry-sdk](https://www.npmjs.com/package/@project-sunbird/telemetry-sdk) SDK easier to use in angular projects.
Downloads
69
Maintainers
Readme
This library is developed to make @project-sunbird/telemetry-sdk SDK easier to use in angular projects.
Currently, the SDK provides directives to listen for INTERACT
and END
events. All the directives start with sdk
. Example: sdk-interact
and sdk-end
.
How to use
- Import the module
SunbirdSdkDirectivesModule
in the AppModule to use library's directives. - Use the directives in the template code of components directly. Whenever the specified event occurs, appropriate sdk methods are invoked. Example:
<div id="container" sdk-interact> <app-sidebar></app-sidebar> <div id="content"> <router-outlet> </router-outlet> </div> </div>