import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';

/**
 * Generated class for the UseFeatureComponent component.
 *
 * See https://angular.io/api/core/Component for more info on Angular
 * Components.
 */
const HTML_TEMPLATE = `
<ion-header>
  <ion-navbar color="primary">
    <ion-title>
      Ionic Academy
    </ion-title>
  </ion-navbar>
</ion-header>
 
<ion-content padding>
 
<div class="special-text">Welcome to the special Ionic Academy Module!</div>
  <button ion-button full icon-left (click)="leavePage()">
    <ion-icon name="close"></ion-icon>
  Close the Page</button>
</ion-content>
`;
 
const CSS_STYLE = `
.special-text {
    font-weight: 800;
    font-size: 15pt;
    text-align: center;
    color: #0000FF;
}
`;


@Component({
  selector: 'use-feature',
  template: HTML_TEMPLATE,
  styles: [CSS_STYLE]
})
export class UseFeatureComponent {

  text: string;

  constructor(private navCtrl: NavController) {
    console.log('Hello UseFeatureComponent');
    this.text = 'Hello World';
  }

  leavePage() {
      this.navCtrl.pop();
  }

}
