@Ionicoser wrote:
Hi all!
my example dosnt work. should i use directives and how they work?
Template:
<div ng-show="status == false">Not checked</div> <div ng-show="status == true">Checked</div>
Part of the controller:
$http.post(url, _postData, config)
.success(function (data, status, headers, config) {
$scope.$apply(function () {
$scope.sendstatus = true;
});
})
.error(function (data, status, header, config) {
$scope.$apply(function () {
$scope.sendstatus = false;
});
});So if the request give a success the template dosnt change. Any ideas?
Kind regards!
Posts: 2
Participants: 2