In the controller, I have this
var onComplete = function(response)
{
$scope.reportList = response.data;
$log.info($scope.reportList);
};
In the HTML, reportList is a JSON like this {packageType=1, salary=12900 }.
ReportList is not an array {{ reportList.packageTypeId }} return 1
The issue is with ng-if div
<div class="exceptionProcedure" ng-if=" reportList.packageType == 1">
<a> display package 1 </a>
when I tried this, it still does not work
<div class="exceptionProcedure" ng-if=" {{reportList.packageType}} == 1">
<a> display package 1 </a>
Any ideas?
ng-showinstead ofng-ifng-if=" {{reportList.packageType}} == 1"is anyways wrong? Can you please print the type ofpackageTypevalue? Something like:console.log(typeof $scope.reportList.packageType);