File

src/lib/wrapper/tags-widget/tags-widget.component.ts

Extends

BaseWrapperComponent

Metadata

Index

Properties
Methods
Inputs

Constructor

constructor(configSvc: ConfigService, discussionService: DiscussionService, navigationServiceService: NavigationServiceService, eventService: EventsService)
Parameters :
Name Type Optional
configSvc ConfigService No
discussionService DiscussionService No
navigationServiceService NavigationServiceService No
eventService EventsService No

Inputs

config
Type : IdiscussionConfig
Inherited from BaseWrapperComponent

Methods

wrapperEventListener
wrapperEventListener(data)
Inherited from BaseWrapperComponent
Parameters :
Name Optional
data No
Returns : void
wrapperInit
wrapperInit()
Inherited from BaseWrapperComponent
Returns : void
ngOnInit
ngOnInit()
Inherited from BaseWrapperComponent
Returns : void

Properties

tagName
Type : string
tags
Type : string
Default value : CONSTANTS.TAGS
tagsAll
Type : string
Default value : CONSTANTS.TAGSALL
state
Type : string
Inherited from BaseWrapperComponent
import { Component, OnInit } from '@angular/core';
import { EventsService } from '../../events.service';
import { NavigationServiceService } from '../../navigation-service.service';
import { ConfigService } from '../../services/config.service';
import { DiscussionService } from '../../services/discussion.service';
import { BaseWrapperComponent } from '../base-wrapper/base-wrapper.component';
import * as CONSTANTS from '../../common/constants.json';

@Component({
  selector: 'sb-tags-widget',
  templateUrl: './tags-widget.component.html',
  styleUrls: ['./tags-widget.component.css']
})
export class TagsWidgetComponent extends BaseWrapperComponent {

  tags: string = CONSTANTS.TAGS
  tagsAll: string = CONSTANTS.TAGSALL
  tagName: string

  constructor(configSvc: ConfigService, discussionService: DiscussionService, navigationServiceService: NavigationServiceService, eventService: EventsService) {
    super(navigationServiceService, eventService, configSvc, discussionService)
  }

  wrapperInit() {
    this.state = this.tags
  }

  wrapperEventListener(data) {
    // if (data.action === this.tags || data.action === this.tagName) {
    //   this.state = data.action
    // }
    this.tagName = data.tagName
  }

}
<div >
    <lib-discuss-tags *ngIf='state === tags'></lib-discuss-tags>
    <!-- <lib-tag-all-discussion *ngIf='state === tagsAll' [tagName]='tagName'></lib-tag-all-discussion> -->
    <!-- <lib-discuss-home *ngIf='state === homePage'></lib-discuss-home>
    <lib-discussion-details *ngIf='state === detailsPage' [topicId]='tid' [slug]='slug'></lib-discussion-details> -->
</div>

./tags-widget.component.css

Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""