Edit in JSFiddle

var $scope;
var app = angular.module('miniapp', []);

app.directive('wbSelect2', function () {
    return {
        restrict: 'A',
        scope: {
                'selectWidth': '@',
                'ngModel': '='
        },
        link: function (scope, element, attrs) {
            //Setting default values for attribute params
            scope.selectWidth = scope.selectWidth || 200;
            element.select2({
                width: scope.selectWidth,
            });
        }
    };
});



function Ctrl($scope) {
    $scope.optionList = {
        'key1': 'Option 1',
            'key2': 'Option 2',
            'key3': 'Option 3',
            'key4': 'Option 4'
    };

    $scope.selectedOption = 'key3';
    $scope.changeModelOutside = function () {
        $scope.selectedOption = 'key4';
        
    };
}
<div ng-app="miniapp" ng-controller="Ctrl">
    <select ng-model="selectedOption" wb-select2 ng-options="k as v for (k, v) in optionList" select-width="300px"></select>
    <button ng-click="changeModelOutside()">Click me</button>
</div>

              

External resources loaded into this fiddle: