-
Notifications
You must be signed in to change notification settings - Fork 938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Countdown not allowing dynamic value #97
Comments
I am also having this issue. I'm trying to put a scope variable into the countdown attribute and it fails with this error: Error: [$parse:syntax] Syntax Error: Token 'selectedNotification.countdown' is unexpected, expecting [:] at column 3 of the expression [{{selectedNotification.countdown}}] starting at [selectedNotification.countdown}}]. |
However the fix doesn't appear to be working for me. |
The fix works without the {{ }} |
Same issue, same fix. The fix works without the {{ }}. |
Ask for pull, please. |
$scope.$broadcast 'timer-set-countdown', secs This works. |
Adding an So from:
To:
My example hasn't been tested for I don't think that adding You just need to delay rendering the directive until the point in the Hope this helps. EDIT: |
Yes this was the reason. The variable was not set yet. I fixed it using a django template variable instead of a angular variable which was not always set. |
@FelixFortis I tried that before, but the problem with that is first off end-time doesn't work at all, second, the moment it is assigned it will start with whatever time that was last rendered, then takes about a sec to update to the current value, meaning you will get a 1 or 2 sec flash. So this is not optimal in my opinion. |
+1 for ng-if solution.... |
works fine: NaN: +1 for ng-if solution |
+1 for ng-if solution ..i tried many ways except ng-if...Wowww its worked perfectly |
👍 for @wtczk it work for me thanks you :) |
Hi,
I've not found a way to add a dynamic(scope) value in attr countdown.
Ex: or (This way throws error in parsing)
To fix this I changed the module directive adding the last line:
(countdown: '=', and it works)
I'm missing something? There is another way?
Thanks.
The text was updated successfully, but these errors were encountered: