$scope.selectedPostsFilter = function () {
return $filter('filter')($scope.posts, {checked: true});
};
ptor.actions().
mouseMove(ptor.findElement(protractor.B.id('foo'))).
perform();
this.showDetails = this.showDetails === false ? true: false;
$scope.exams=data;
$scope.getPatientDetails = function(user){
user.$showDetails = user.$showDetails === false ? true: false;
$http.get("api/controllers/LaboratoryController.php?RequestNumInt="+user.RequestNumInt).success(function(data){
user.$exams=data;
});
};
$scope.getPatientDetails = function(user){
if (!user.$showDetails){
$http.get("api/controllers/LaboratoryController.php?RequestNumInt="+user.RequestNumInt).success(function(data){
user.$showDetails = true;
user.$exams=data;
console.log(user.$exams);
});
} else {
user.$showDetails = false;
}
};
.controller 'someCtrl', ($scope, QueryesService) ->
$scope.receiveData = {}
$scope.getSomeData = ->
QueryesService.get currentService : 'service1', (response) ->
angular.extend $scope.receiveData, response
// transform outgoing request data
transformRequest: [function(d) {
return isObject(d) && !isFile(d) ? toJson(d) : d;
}]
function toJson(obj, pretty) {
if (typeof obj === 'undefined') return undefined;
return JSON.stringify(obj, toJsonReplacer, pretty ? ' ' : null);
}
function toJsonReplacer(key, value) {
var val = value;
if (typeof key === 'string' && key.charAt(0) === '$') {
val = undefined;
} else if (isWindow(value)) {
val = '$WINDOW';
} else if (value && document === value) {
val = '$DOCUMENT';
} else if (isScope(value)) {
val = '$SCOPE';
}
return val;
}