1

As Question and Answer related to ng-disabled didn't help, so I am writing this question for help.

The problem is in my angularjs app ng-disabled is not working properly.

Here is the jsfiddle of the problem
http://fiddle.jshell.net/80cLw91j/

the desired behaviour is when you click the start button, all input elements including the start button should get disabled and stop button should get enabled and vice versa when you click stop button.

Vikas Gautam
  • 1,793
  • 22
  • 21

1 Answers1

0

Answer is pretty simple. You facing Angular scope dot problem and here is jsfiddle for you.

Community
  • 1
  • 1
Sergey Moiseev
  • 2,953
  • 2
  • 24
  • 28
  • You know what.. It was a typo which was driving me crazy since 4 hours now. I was using `ac.runnnig` in the html. huh! So problem is solved. Thanks for your time! – Vikas Gautam Oct 13 '16 at 00:06
  • Not a problem, I am not going to tell you how much time I wasted on that few years ago when I started working with Angular because it's pretty embarrassing :) – Sergey Moiseev Oct 13 '16 at 00:07
  • hehe.. Keep it a secret. yaa. it's a kind of embarrassing. – Vikas Gautam Oct 13 '16 at 00:10
  • Somebody downvotes, while yet you going to face that dot problem as soon as you add any directive that will create a new scope for you (ng-repeat, ng-if and so on). – Sergey Moiseev Oct 13 '16 at 00:16
  • Downvoters should find some time and express the reason of downvote. @Sergey Moiseev To be honest, I was able to find the typo error only after reading your answer. So for me, your answer was a life savor. – Vikas Gautam Oct 13 '16 at 00:19
  • @VikasGautam that's good. Btw I was thinking it was my typo. But anyway, check out that scope dot link it's going to save you another hours of time wasted. – Sergey Moiseev Oct 13 '16 at 00:23
  • 1
    I downvoted the question because the code needs to be _in the question itself_ (otherwise it’s off-topic) and the answer because it also needs to include the code and the most important parts behind the first link _in the answer itself_, not just link to it. Link-only answers are considered low quality. – Sebastian Simon Oct 13 '16 at 08:14