i need to call angular function (=controller) in JS fuction on .jsp . I had try lot of possiblities but nothing run.
I have .jsp file with my HTML and JS, and i have angular function in app.js.
/*
** app.js
*/
$scope.addEvent = function(element, byTypeAdd) {
if ($scope.element && $scope.byTypeAdd){
$scope.events.push({ name : $scope.element, type : $scope.byTypeAdd });
$scope.element = '';
};
}
<script>
function fewValues() {
var valueId = 1;
var valueType = "Type 1";
/*Here i want to use addEvent*/
}