Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49215

Ion-tab attribute directive

$
0
0

@opahopa wrote:

Hi.

I have a simple attr directive:

@Directive({
  selector: '[auth-protected-click]' // Attribute selector
})
export class AuthProtectedClickDirective {

  constructor() {
    console.log('fgfgfgfgfgfgfg')
  }

  @HostListener('click', ['$event']) onClick($event){
    console.info('clicked: ' + $event);
  }
}

trying to use it with the ion-tabs

<ion-tabs tabsPlacement="bottom">
    <ion-tab [root]="sellTabRoot" tabTitle="Sell" tabIcon="camera" auth-protected-click></ion-tab>
</ion-tabs>

directive is initialized, but @HostListener never gets fired on click. really stuck - why would it happen?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>