I am new to angularjs, I know that $scope
represent a connection between the controller and the view, But is there a way besides looking for class=\"ng-sc
I dont know what do you exactly mean but hope it help you.
by this directive you can access the DOM element inside controller
this is sample that help you to focus element inside controller
.directive('scopeElement', function () {
return {
restrict:"A", // E-Element A-Attribute C-Class M-Comments
replace: false,
link: function($scope, elem, attrs) {
$scope[attrs.scopeElement] = elem[0];
}
};
})
now, inside HTML
then, inside controller :
.controller('messageController', ['$scope', function ($scope) {
$scope.txtMessage.focus();
}])