I an using spring and hibernate with angularjs.. and i am fetching data from database but i want to get my data in angular function..
Here is my angular function
artle = angular.module('myApp', []);
artle.controller('myCtrl', function($scope) {
$scope.class = "div0f";
$scope.changeClass = function() {
if ($scope.class === "div0f")
$scope.class = "div0p";
else
$scope.class = "div0f";
};
$scope.Unsub = function() {
if ($scope.class === "div0p")
$scope.class = "div0g";
};
})
I want to get a value from database to use in this function in if else condition.
Please suggest me. Thnx in advance