0

Novice to AngularJS. I am wondering if there is something equivalent to $ in Angular. I found that $scope object is an instance of function constructor Scope.I have to say that I created $scope without defining a controller, just by:

var $scope = angular.element($('#quantity')).scope();

where quantity is the id of an element. My question is how to access Scope function object. I want e.g.

$scope.__proto__===Scope.prototype

However in the right, Scope is unknown. Where does it belong to? Which is its context?

Unknown developer
  • 5,414
  • 13
  • 52
  • 100
  • 1
    You are probably doing something you really don't need to do. Where are you using this code and what exactly are you trying to do within your app? – charlietfl Feb 23 '16 at 12:50
  • 1
    As I understand it, you usually don't want the equivalent of jQuery's `$` in Angular. This may be useful: [*“Thinking in AngularJS” if I have a jQuery background?*](http://stackoverflow.com/questions/14994391/thinking-in-angularjs-if-i-have-a-jquery-background) – T.J. Crowder Feb 23 '16 at 12:50
  • I just asked: What do I have to add in front of `Scope.prototype` in order to get true from the above comparison. Just that! – Unknown developer Feb 23 '16 at 12:56
  • duplicate http://stackoverflow.com/questions/24629370/jquery-trigger-equivalent-in-angularjs – Gabriel Matusevich Feb 23 '16 at 13:47
  • Show more code related to what you are doing or trying to do. It really looks like you are way off on a tangent here and whatever you are doing most probably has a more appropriate approach – charlietfl Feb 23 '16 at 14:03

0 Answers0