I want to compare a value inside of my controller (angularjs) but didn't want to make it using only javascript code. Because it would be considered "weak", once anyone could see it.
What's the best way to check a value using JS and PHP?
Is it possible to send a request and have a return from the PHP page to my JS controller?
app.controller('headerController',function($scope){
valueFromView = $scope.value.property;
//send a request to the php page and get the value back from it
if(this value from PHP == valueFromView){
//my dream come true
}
});
ajax. AngularJS uses the$httpmethods togetandpostdata back to the server.