Klasik javascript ile angulerjs scope fonkiyonu çağırmak


<!– Page Content –>
<div ui-view id=”page-wrapper”>

angular.module(‘BenimAPP’).controller(‘BenimController’, [‘$scope’, ‘$stateParams’, ‘$window’,
function ($scope, $stateParams, $window ) {
// window.alert(“Ben denemem”);
$(‘#dataTables-example’).DataTable({
responsive: true
});

// $scope.action = $stateParams.action;

// window.alert($scope[]);
// window.alert($scope.id);

$scope.reload = function () {
location.reload();
}

$scope.deneme = function () {
window.alert(“controller daki deneme foknsiyonuyum”);
}
}]); //angular.module

 

 

<script>

// klasik javascript ile angulerjs scope fonkiyonu çağırmak

angular.element(document.getElementById(“page-wrapper”)).scope().deneme();

<script>

VN:F [1.9.22_1171]
Rating: 9.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Klasik javascript ile angulerjs scope fonkiyonu çağırmak, 9.0 out of 10 based on 1 rating