appice.directive('fileModel', ['$parse', function ($parse) {
    return {
       restrict: 'A',
       //controller:'campaignsController',
       link: function(scope, element, attrs) {
          var model = $parse(attrs.fileModel);
          var modelSetter = model.assign;
          
          element.bind('onchange', function(){
             scope.$parent.uplodBasicImg();
             scope.$apply(function(){
                modelSetter(scope, element[0].files[0]);
             });
          });
       }
    };
 }]);