<span class="diff curls" ng-if="{diffInMiliseconds > 60000}"> ( + </span> Error> unexpected token
Probably it is necessary to shield this symbol so that the condition fulfills or in ng-if it is not possible to set comparison conditions at all?
( + Error> unex...">
<span class="diff curls" ng-if="{diffInMiliseconds > 60000}"> ( + </span> Error> unexpected token
Probably it is necessary to shield this symbol so that the condition fulfills or in ng-if it is not possible to set comparison conditions at all?
The expression for ng-if must be a valid angular expression, otherwise a parse error will be generated.
In this case, curly braces are redundant, if you remove the expression will be correct.
Example:
angular.module('app', []); <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.6/angular.js"></script> <div ng-app="app" ng-init="diffInMiliseconds=60001"> <span class="diff curls" ng-if="diffInMiliseconds > 60000"> ( + </span> <span class="diff curls" ng-if="diffInMiliseconds <= 60000"> removed </span> </div> <span class="diff" ng-if="row.days != 0 || row.hours != 0 || row.minutes != 0">( + <span class="diff" ng-if="row.days">{{row.days}} д.</span> <span class="diff" ng-if="row.hours">{{row.hours}} ч.</span> <span class="diff" ng-if="row.minutes">{{row.minutes}} м.</span> ) </span> Source: https://ru.stackoverflow.com/questions/745412/
All Articles