title: angular 6: A class declaration without the 'default' modifier must have a name
body: <p>I am getting this kind of error in my <code>ts.file</code>, what could be the reason in which I am just starting to learn the angular/ionic world. </p>
  
  <hr>
  
  <p>I have tried various ways to clear it but no luck.</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { NavController, NavParams } from '@ionic/angular';
  import {Announcements} from '../../../environments/environment';
  import {AngularFireAuth} from 'angularfire2/auth';
  import {AngularFireDatabase} from 'angularfire2/database';
  import { take } from 'rxjs/operators';
  import { Directive, HostListener, ElementRef } from '@angular/core';
  
  @Component({
    selector: 'app-add-our-announcements',
    templateUrl: './add-our-announcements.page.html',
    styleUrls: ['./add-our-announcements.page.scss'],
  })
  @Directive({
    selector: 'ion-textarea[autosize]' // Attribute selector,
  })
  export class {
  
      constructor(
        private afauth: AngularFireAuth,
        private afDatabase: AngularFireDatabase,
        public navCtrl: NavController,
        public navParams: NavParams,
        public element: ElementRef) {
      }
  
     announcements = {} as Announcements;
  
    @HostListener('document:keydown.enter', ['$event']) onKeydownHandler() {
      this.adjust();
    }
  
    AfterViewInit() {
        this.adjust();
      }
  
      adjust(): void {
        const textArea = this.element.nativeElement.getElementsByTagName('textarea')[0];
        textArea.style.overflow = 'hidden';
        textArea.style.height = 'auto';
        textArea.style.height = (textArea.scrollHeight + 42) + 'px';
      }
  
  
  
          createAnnouncements() {
              this.afauth.authState.pipe(take(1)).subscribe(() =&gt; {
                this.afDatabase.list(`announcements`).push(this.announcements)
                  .then(() =&gt; this.navCtrl.navigateForward('ListOfOurAnnouncementsPage'));
              });
          }
  
    }
  </code></pre>