javascript - Can you get element.text() from the from an ngBind expression? -
i have big long dumb directive using ngbindtemplate accomplish if access element.text() inside expression remove directive.
question: how access 'element.text()' ngbind expression?
<h1 ng-bind="worldmapctrl.header.docs.intro || 'element.text()'">abc</h1>
don't think can it, sorry!
did test unable access element self. if do:
<h1 id="test" ng-bind="worldmapctrl.header.docs.intro || this.$id">abc</h1> and console do:
angular.element(document.getelementbyid('test')).scope() and check $id see same. if do:
angular.element(document.getelementbyid('test')) you see innerhtml blank if ng-bind failed.
Comments
Post a Comment