title: Check if component have attribute selector in angular2
body: <p>I wanna check if component has an attribute or not in Angular2. here is my component:</p>
  
  <pre><code>import { Component, OnInit, Input } from '@angular/core';
  
  @Component({
      selector: 'field-group, field-group[half]',
      template: `
      &lt;div class="field-group"&gt;
        &lt;label *ngIf="label != ''"&gt;{{label}}&lt;/label&gt;
        &lt;ng-content&gt;&lt;/ng-content&gt;
        &lt;span class="validation" *ngIf="errorObject != ''"&gt;&lt;/span&gt;
      &lt;/div&gt;
      `
  })
  export class FieldGroupComponent implements OnInit {
      @Input() label: string = '';
      @Input() errorObject: any;
  
      constructor() { }
  
      ngOnInit() { }
  
  }
  </code></pre>
  
  <p>For the selector I added <code>[half]</code>. now how can I check this component have this selector in code when I used? where can I check this exist or not? and how?</p>
  
  <p>Thanks.</p>