标签云

微信群

扫码加入我们

WeChat QR Code

I have an issue/concern with something I am doing($location.$$path === '/lines') ? $scope.displayLogout = true : $scope.displayLogout = false;if I do it the way above, JSHint provides an errorExpected an assignment or function call and instead saw an expression.but if I come up this wayif ($location.$$path === '/lines') { $scope.displayLogout = true;}else { $scope.displayLogout = false;}everything works properly.Isn't the same?What am I doing wrong ?