Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ...
- $scope.firstItem = data[0];
- ....
- module.exports = function(){
- return function(scope, element, attrs) {
- scope.$watch('$parent.firstItem', function(oldValue, newValue){
- var firstTableRow = element[0].children[0].children[0];
- if ( firstTableRow !== undefined ) {
- firstTableRow.classList.add('info');
- firstTableRow.focus(); // Todo: Not focusing, need to find out why
- }
- });
- };
- };
- firstTableRow.trigger('click');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement