I am having trouble with angularjs directives finding child DOM elements with the injected angular element.
For example I have a directive like so:
If anyone is looking to grab the scope off of a 'controller as' element,.. something like this:
use the following: var vm = angular.element(document.querySelector('#firstctrl')).scope().vm; 0 讨论(0) 查看其它7个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
use the following:
var vm = angular.element(document.querySelector('#firstctrl')).scope().vm;