Comments (7)
Ok thanks for your help. Would be great if in a future version we could just use the normal $broadcast('timer-stop') with an id instead of using the DOM method.
from angular-timer.
I need the exact thing, not only for start stop to broadcast using id also.....
from angular-timer.
Yes, you can control them through ids. Its just a DOM method $('#timer1')[0].start();
and
$('#timer2')[0].stopt();
should work independently.
I remember writing a plunkr for that. But, I couldn't find it faster. So, try that & let me know if it works.
from angular-timer.
It's working when using:
$('timer')[x].start();
$('timer')[x].stop();
Would you recommend doing this from an angular controller?
from angular-timer.
May be...
But, from a controller I would create separate controllers for each timer directive(if not too many) or create an isolated scope & control it from there.
from angular-timer.
Yes, the problem is I don't want too much DOM logic inside this directive. May be it makes sense in this case.
from angular-timer.
I have tried the latest version looks it is not working with $('timer')[0].start()
.
It said: "Uncaught TypeError: $(...)[0].start is not a function".
I am using it inside "Angular ui router" is it the one which caused the problem?
Any help is appreciated. Thanks.
from angular-timer.
Related Issues (20)
- Timer value is not updated? HOT 1
- Using both start-time and end-time HOT 3
- Timer is working in wrong way with exactly one year gap HOT 1
- Countdown not working with low value
- Missing $scope reference?
- Add timer in list: "timeoutId is not defined" error message HOT 3
- Customise countdown visualization HOT 2
- $scope.$broadcast('timer-reset') restarts all available timers in the scope when using ng-repeat
- end-time counting up instead of counting down HOT 1
- Is it support angular2 & 4 version for dynamic value support?
- Regular Expression Denial of Service issue with momentjs > v2.11.2
- finish-callback not found
- Can't bind data to countdown attribute HOT 1
- start-time setting HOT 1
- When ticks whole div's background color changed to white, only happens on safari
- Count down does not stop even after the timer-stop is triggered
- Set interval in Chrome console
- Is this plugin available in Angular 2 or above angular version?
- Changing CSS when seconds > x
- An old vulnerable version of "bootstrap" is used in the repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-timer.