Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9132071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:14:55+00:00 2026-06-17T08:14:55+00:00

I just started to learn AngularJS and struggle with some concepts of AngularJS. It

  • 0

I just started to learn AngularJS and struggle with some concepts of AngularJS. It would be great if somebody could explain me some points…

  1. I understand that ng-click is technically not the same as onclick (see here), but both are placed in the markup. I thought that would be a “bad practice”? Why is this one of the core concepts of AngularJS, if most people say this is “bad”? I thought it would be better to select the DOM element from JavaScript and not to place logic in the markup.

  2. If ng-click is the right way to react to click events in AngularJS what should I do with other DOM events? I see that there are several other directives like ng-mouseover, but not all DOM events have a AngularJS equivalent. How would I handle a ‘drop’ event in AngularJS (hence in the AngularJS way – not the normal way)? To be clear: I want to drag a file into my webapp.

Thank you very much,
Pipo

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:14:56+00:00Added an answer on June 17, 2026 at 8:14 am

    Why is this one of the core concepts of AngularJS, if most people say this is “bad”?

    Well, people who really like Unobtrusive JavaScript might say it is bad. Angularians (and those with a flex background) see value in the more declarative approach.

    “Angular is built around the belief that declarative code is better than imperative when it comes to building UIs and wiring software components together… By declaratively describing how the UI should change as your application state changes, you are freed from low level DOM manipulation tasks. — Overview doc

    See also Don't the data attribute options used in Bootstrap, Angular.js, and Ember.js conflict with Unobtrusive Javascript principles?

    what should I do with other DOM events?

    Write your own directives to listen for them (or find one that someone else has already written). Angular gives you the power to extend what the browser can do — by writing your own directives.

    Update: in the comments below, Tim Stewart mentions AngularUI’s ui-event, which lets you bind a callback to any event not natively supported by Angular.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i just started to learn struts(+spring) MVC, and I could use some explanation of
I just started to learn Rails and I cannot understand that: In my Post
I just started to learn about mod rewrite process. Now, I got some problems
Well, I've just started to learn Exceptions at college, here is a code that
I just started to learn SVN. Please give me your advice to understand the
I just started to learn MVC and am trying to understand how it works.
I just started to learn some Odata and I need help at some queries
I just started to learn python, so I need some help. I have closeparams.txt
OK so i just started to learn vb and did some experimenting until i
i just started to learn coffeescript and it's great, but it's tricky.. i try

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.