@mateuspaegle wrote:
Hi guys!
I have a component where I am trying to isolate the entire logic of a button to make the application logout.
// logoutbutton.js import {Component} from 'angular2/core'; import {NavController} from 'ionic/ionic'; import {LoginPage} from '../login/login'; @Component({ selector: 'logout-button', templateUrl: 'build/pages/logoutbutton.html' }) export class LogoutButton { constructor(nav: NavController) { this.nav = nav; } handleSair() { this.nav.rootNav.setRoot(LoginPage, {}, {animate: true, direction: 'back'}); } } // logoutbutton.html <button (click)="handleLogout()"> <ion-icon name="log-out"></ion-icon> </button>
So far so good, except that when I update it, it seems he does not compile the properties ... He also does not think the ion-icon component ...
Does anyone know how to make it work?
Posts: 3
Participants: 2