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
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);
}