Issue
As in the documentation it is like some div or html tags wrapping out the expression. http://docs-angularjs-org-dev.appspot.com/api/ng.directive:ngBind Is there a way to just get the expression value without the or whatsoever wrapper it?
Solution
ngBind is a directive, and all directives must be attached to a tag. So no, there's no way to use ngBind itself without putting it on some kind of tag.
As mentioned, you can use string interpolation in the form of {{expression}} instead.
ngBindTemplate exists because some HTML elements don't allow child elements, so {{expression}} may not work correctly. In those cases, you put ngBindTemplate on the element; it doesn't make sense to use it without a "wrapper" element.
Answered By - Michelle Tilley
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.