I want to add class to span element using angular
<div class="input-group textbox-wrap fade-in two">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input type="text" class="form-control" id="username" placeholder="{{'global.form.username.placeholder' | translate}}"
required="required" data-ng-model="username" ng-focus="focusInput($event)" ng-blur="blurInput($event)" autofocus />
</div>
I am able to adding the class to parent div but i need to apply class for span element.
In the controller,
$scope.focusInput= function($event )
{
angular.element($event.target).parent().addClass('focused');
};