Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

Is there a way to set the value of a label tag by invoking a function? I mean, something like the following:

<label>Convert_Code(4)</label>

where Convert_Code is javascript function that converts the received code (4 in the example) to a string.

Thanks.

share|improve this question
    
Do you want to fire the function when the label is clicked, or do you just want to change the text? – developius 21 hours ago

Solved the problem by using the following syntax:

<label> {{Convert_Code(MyArray_One_Entry.Code_ID)}}</label>

where the ng-repeat runs through all the elements of an array named MyArray.

share|improve this answer
2  
How would anyone know that you were talking about angular in the first place? – canon 19 hours ago
    
Right. Missed adding that point. My apologies. – FDavidov 19 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.