I've got this element:
<span id="tag_span"> {{ selectedSection }} </span> And I want to get its content from controller, which is {{ selectedSection }}. I can get the element like this:
angular.element('#tag_span'); but don't know how to get what inside of it. Any ideas?
P.S. document.getElementById won't work in the case so there's no need to suggest it.
EDIT: No jQuery allowed.
getElementByIdwill not work. Duplicating ID's will make it impossible to validate your page and cause the page to run in quirks mode on all browsers. The value of the ID attribute, if assigned, must be unique for every element that has an ID on the page. Just a warning.