File
Index
Properties
|
|
Methods
|
|
Outputs
|
|
Outputs
close
|
Type : EventEmitter
|
|
Methods
addTelemetry
|
addTelemetry(id)
|
|
|
userVisited
|
userVisited()
|
|
|
import { ResourceService } from '@sunbird/shared';
import { Component, Output, EventEmitter } from '@angular/core';
import { TelemetryService } from '@sunbird/telemetry';
import { ActivatedRoute } from '@angular/router';
import * as _ from 'lodash-es';
@Component({
selector: 'app-explore-ftu-popup',
templateUrl: './explore-ftu-popup.component.html',
styleUrls: ['./explore-ftu-popup.component.scss']
})
export class ExploreFtuPopupComponent {
@Output() close = new EventEmitter();
constructor(public resourceService: ResourceService,
private activatedRoute: ActivatedRoute,
private telemetryService: TelemetryService) { }
userVisited() {
if (!localStorage.getItem('anonymous_ftu_groups')) {
localStorage.setItem('anonymous_ftu_groups', 'anonymous_user');
}
this.close.emit();
}
addTelemetry (id) {
const interactData = {
context: {
env: _.get(this.activatedRoute, 'snapshot.data.telemetry.env'),
cdata: []
},
edata: {
id: id,
type: 'click',
pageid: _.get(this.activatedRoute, 'snapshot.data.telemetry.pageid'),
},
};
this.telemetryService.interact(interactData);
}
}
<div class="sb-group-page-container">
<div class="sb-group-container sb-group-container--sm sb-bg-color-white">
<a class="close" tabindex="0" (click)="userVisited();addTelemetry('close-ftu')" role="button" aria-label="Close Welcome Popup"><i class="icon-svg icon-svg--xs icon-close" ><svg class="icon icon-svg--primary">
<use xlink:href="./assets/images/sprite.svg#close"></use>
</svg></i></a>
<!-- content comes from CC -->
<h4 class="sb-group-container__title">{{ resourceService?.frmelmnts?.lbl?.groupWelcomeTitle }}</h4>
<img src="./assets/images/groups.png" class="sb-group-container__img" role="presentation" alt="" />
<p class="sb-group-container__description">{{ resourceService.frmelmnts.lbl.groupWelcomeMsg }}</p>
<button type="button" class="sb-btn sb-btn-sm sb-btn-primary text-uppercase w-100" tabindex="0" (click)="userVisited();addTelemetry('ftu-get-started')">{{ resourceService.frmelmnts.lbl.getStarted }}<span
class='arrow-icon pull-right'><i class="icon-svg icon-svg--xxs icon-back">
<svg class="icon icon-svg--white">
<use xlink:href="./assets/images/sprite.svg#arrow-long-right"></use>
</svg></i></span></button>
<!-- content comes from CC -->
</div>
</div>
@use "@project-sunbird/sb-styles/assets/mixins/mixins" as *;
@use 'pages/page-center-view.scss' as *;
Legend
Html element with directive