0

Why is my timer tag not working in Angularjs? I used the following code

<timer interval="1000" countdown="100">{{countdown}}</timer> 

Also, how to alert the timer minutes and seconds while I click the get time button given in the plunker?

Here is the plunker: http://plnkr.co/edit/u4kaFALY0TkUxipjvG0p?p=preview

1 Answer 1

2

Include your script after including libraries like jQuery / angular:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<script src="https://dl.dropboxusercontent.com/u/8824346/angular-timer.js"></script>
<script src="script.js"></script> <!-- Moved this one after the libraries above. -->

Updated, working plunker.

Sign up to request clarification or add additional context in comments.

2 Comments

@RamanaUday why don't give it a try yourself? It helps learning and understanding. If you have a specific question or problem, please create a new post.
I have been trying for almost 2 hours with different functionality but not working please can u help me regarding this @nilsK

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.