valor-software/ng2-bootstrap

View on GitHub
scripts/docs/api-doc-test-cases/component-with-internal-methods.ts

Summary

Maintainability
A
0 mins
Test Coverage
import {Component, Input, OnInit} from '@angular/core';

/**
 * Foo doc
 */
@Component({
  selector: '[foo]',
  template: '<button (click)="forTemplateOnly()">{{buttonTxt}}</button>',
  exportAs: 'foo'
})
export class Foo implements OnInit {
  @Input() buttonTxt;

  constructor() {
  }

  /**
   * Only used in a template
   *
   * @internal
   */
  forTemplateOnly() {
    console.log('I was clicked!');
  }

  ngOnInit() {
  }
  
  private _dontSerialize() {
  }
}