What you want is quite difficult to achieve and you can see an example of how to do it in the following link
link
I have achieved the same without much difficulty hiding the input type file and using a common button that you can style as you like
Here I leave you a directive that you can use in which you only have to change the button
element to what you want to use instead.
angular.module('myApp', [])
.directive('pickFile', function() {
return {
restrict: 'EA',
template:
'<button class="button">Pick</button>' +
'<input type="file" style="display: none !important">',
link: function($scope, $element) {
var input = $element.find('input');
var button = $element.find('button');
var evtHandler = function() {
input[0].click();
};
button.on('click', evtHandler)
}
};
});
.button {
padding: 10px 20px;
background-color: red;
color: white;
border-radius: 6px;
font-weight: bolder;
}
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="myApp">
<pick-file></pick-file>
</div>
This is the simplest example possible, since you are using ionic you can use the style classes of this or the your own to design the buttons.
Something like
<button class="button button-icon icon ion-plus-round"></button>
I leave you a complete example
angular.module('myApp', ['ionic'])
.directive('pickFile', function() {
return {
restrict: 'EA',
template: '<button class="button button-icon icon ion-plus-round pull-right">' +
'<input type="file" style="display: none !important">' +
'</button>',
link: function($scope, $element) {
var input = $element.find('input');
var button = $element.find('button');
var evtHandler = function() {
input[0].click();
};
button.on('click', evtHandler)
}
};
});
<link href="http://code.ionicframework.com/1.3.0/css/ionic.min.css" rel="stylesheet" />
<script src="http://code.ionicframework.com/1.3.0/js/ionic.bundle.min.js"></script>
<div ng-app="myApp">
<div class="bar bar-header bar-balanced">
<pick-file></pick-file>
<h1 class="title">Perfil estudiante</h1>
</div>
</div>