Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onclick event #43

Open
RahulJyala opened this issue Jan 15, 2017 · 2 comments
Open

Onclick event #43

RahulJyala opened this issue Jan 15, 2017 · 2 comments

Comments

@RahulJyala
Copy link

First of all this is the cool fab menu
I want event manipulation on click events
<ion-floating-menu> <ion-floating-item icon="ion-contact" onclick="DoSomething()"></ion-floating-item></ion-floating-menu>

i wrote a external script
function DoSomething() { alert("in my Logic") }
but my function not invoked .i also tried ng-click with angular
any helps how can i envoke click ?

@ng22792
Copy link

ng22792 commented Jan 15, 2017

Use ng-click instead of onclick and make sure you are declaring the function as a scope function : $scope.DoSomething = function () { alert ("in my logic"); } or even $rootScope.DoSomething should work. Also declare it in the same controller that will access the page where the ion-floating-menu is kept. Do let me know if it helped.

@MrMargouillat
Copy link

@ng22792 Hey, I've tried as you explained but I got an error saying : v2.last is not a function
I am bundling the doc with browserify. Have an idea of the source of the problem?
Thanks ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants