AngularJS - why do I need to click twice on the button?

1 . I bought this template http://www.tattek.sk/minotaur-dash2/#/app/dashboard
and I'm customizing it.

2. You see the guy's photo on top right. You click on it once and the popup shows up
popup
3. In my site, I have to click on the "profile" twice.

You can see it here. Login and click on the name on top right (I don't have a photo)

Site: http://147.75.0.117:88

Login with admin@admin.com / Password321$

4. Unlike the theme code, I have a ng-click. It's expandUserInfo() . I see the "aria-expanded" is false when the page loads

element
5. I click on the "profle" name and I see the element updated but it's updated to "false" (it should be true). I click again and that's when it's updated to "true" and I see the popup.

What am I missing? how can I fix this? (I spent too much time on this trying to figure it out)
LVL 8
CamilliaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
Weird one - the first click is simply not registered. However, if you put a break point on the click handler it is.

I am wondering if there isn't another click handler somewhere "stealing" the first click.

In your controller in the expandUserInfo() function can you add a
console.log('clicked');

Open in new window

So we can see if the click is actually firing.
0
Julian HansenCommented:
I just looked at the original template - they don't seem to have an ng-click on their profile area - is there any particular reason you added one to yours.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CamilliaAuthor Commented:
If there's no ng-click, how is the popup opened in the template?

I'll add the console.log and see. I'll post back tonight.
0
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Julian HansenCommented:
I am guessing through a directive on an attribute - I have not had time to look at it in depth.
0
CamilliaAuthor Commented:
There's a directive folder. I'll look into it tonight and see if I can figure it out.
0
Julian HansenCommented:
If you don't come right post back - hopefully things will have eased up by then and I can investigate this more thoroughly.

It is an odd one though - if you try to debug the page and put a break point on your click handler it works.
0
CamilliaAuthor Commented:
Thanks, Julian. I'll look at the orig code and see how it works and go from there.
0
CamilliaAuthor Commented:
I added console.log('clicked'); and the ng-click gets called. I'll look at the template code and see how they're doing it without having ng-click.
0
CamilliaAuthor Commented:
Fixed!

I copied the entire tag from the template and copied it to my code and that worked.

You asked why I have ng-click. When I got the template, I wasn't as familiar with AngualrJS and started added ng-click to mimic what the template's functionality. I didn't think of just copying the code and see if that works. It did.
0
Julian HansenCommented:
Awesome, glad you are working.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.