亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - Both angular and jquery use the $ symbol, will there be any conflict if used together?
世界只因有你
世界只因有你 2017-06-14 10:50:38
0
6
1012

For example, $scope.op = $('#box'), the two $ before and after belong to different libraries. . Will there be any problem

世界只因有你
世界只因有你

reply all(6)
漂亮男人

No.
$ in jQuery is equivalent to jQuery being a variable $scope
in angular, $http, etc. are also separate variableswhere $ is just a part of the variable name, such as var $abc = 'abc'
where $ will not conflict with $ in jQuery

伊謝爾倫

I don’t think so

迷茫

$scope and $ are two completely different variable names that have no relationship. . .

伊謝爾倫

No way~
$scope You can treat it as an object... $ It’s another object
like var abc=1; var a=2; There will be no conflict between these two objects.. .

阿神

The

$ in $scope is just a prefix of a variable and has nothing to do with $. The $ in jQuery is a real variable.

給我你的懷抱

You can redefine a symbol for jQuery and release the control of $,
For example:
`var $j = jQuery.noConflict();
$j(".box").on("click",function(){ //code});
`

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template