referring to this question angularjs: directive creates two child scope. How is it possible to get the scope id in question.
i.e. the Scope (003), Scope (004) etc
You can get any scopes id by console logging it:
Controller:
function($scope){ //injected
console.log($scope.$id);
}
Directive link function:
function(scope, element, attributes){
console.log(scope.$id);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With