AngularJS Nested IF -
AngularJS Nested IF -
i'm trying add together bit of logic controller couple of nested if statements. work fine, after nesting them, i'm not getting results.
this working statement:
if (typeof object["frequency"]!='undefined' && object["frequency"]=='yearly' && ('now' <= 'upcoming')) { $scope.summary[segment].totallaterelationships++; $scope.summary[segment].laterelationships.push(object); } this working:
if (!(object["nextmeetingowner"].length) || !(object["nextmeetingowner"].length) ) { $scope.summary[segment].totallaterelationships++; $scope.summary[segment].laterelationships.push(object); } this i'm trying accomplish:
if (!(object["primaryaccountability"].length) || (!(object["nextmeetingowner"].length))) { if (typeof object["frequency"]!='undefined' && object["frequency"]=='yearly' && ('now' <= 'upcoming')) { $scope.summary[segment].totallaterelationships++; $scope.summary[segment].laterelationships.push(object); } }
that 3rd code block checking different first two. it's evaluating
!(object["primaryaccountability"].length) ...whereas before code evaluating
!(object["last meeting date"].length) angularjs
Comments
Post a Comment