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
.
- 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>