display(str)
内部で呼び出したいプレーンな JavaScript 関数がありng-if
ます。この関数はコントローラの範囲外です
HTML
<body ng-app="myApp">
<div id="mycntrl" ng-controller="mainController">
<select id="selectid1" name="selectid1" ng-model="angularselect">
<option ng-value=""></option>
<option ng-value="val1">Value 1</option>
<option ng-value="val2">Value 2</option>
</select> Value : {{angularselect}}
<div ng-if="display(angularselect) === true">
<p>
Returned true
</p>
</div>
</div>
</body>
JS
var myApp = angular.module('myApp',[]);
myApp.controller('mainController',function($scope){
});
function display(str)
{
console.log('Javascript function called with argument '+str);
return true;
}