The volume $ does not work inside the jQuery function, although it was called using the angular element, as suggested by keddour's answer.
Using a directive to call a function seems to be the correct answer.
For those who are looking for a simpler method for use in special circumstances (for example, in a dynamically loaded script), data exchange is also exchanged using a global variable. This violates some conventions, but Angular is really not perfect yet, and sometimes we have to resort to odd methods of solving problems.
Declare something like that in a global area.
angularBridge = {};
Now in your controller (I assumed it in a dynamic script):
demoApp.controlProvider.register('demoController', ['$scope', function($scope) { angularBridge.$demoScope = $scope; $scope.landmark.avatar = 0; }]);
Now you can use this as an Angular controller or jQuery function to exchange data.
function LandmarkNewCtrl($location, $scope, db) { $('#fileupload').fileupload({ url: '/api/upload', dataType: 'text', done: function (e, data) { angularBridge.$demoScope.landmark.avatar = data.result; } }); }
source share