{"body":"const cmp_rolePickerController = function rolePicker($scope, $element, $attrs, cmp_rolePickerService) {\n    const ctrl = this\n\n    ctrl.update = function(prop, value){\n        ctrl.onUpdate()\n    }\n    ctrl.$onChanges = function(newObj){\n        if(Array.isArray(newObj.roles.currentValue) && newObj.roles.currentValue.length > 0){\n            ctrl.selectedRole = newObj.roles.currentValue[0]\n            newObj.selectedRole = newObj.roles.currentValue[0]\n        }\n    }\n    ctrl.$onInit = function(){\n        if(Array.isArray(ctrl.roles) && ctrl.roles.length > 0)\n            ctrl.selectedRole = ctrl.roles[0]\n        //do init stuff\n    }","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/mwkVfI6p","modified":1527190642,"id":"mwkVfI6p","size":641,"lines":17,"own_paste":false,"theme":"","date":1527190642}