How to pass NgModelController to directive controller?
Can i pass NgModelController to directive controller? That's required so i can assign values to model in controller. This example does not work: angular .module('directives.selectBox', []) .directive('selectBox', selectBox); function selectBox() { return { restrict : 'E', require : 'ngModel', scope : { list : '=', }, replace : true, templateUrl : 'common/directives/selectBox/selectBox.html', controller : SelectBoxController, }; } function SelectBoxController(ngModel) { ngModel.$setViewValue(10); // ??? } Robba Pretty simple actually, what you need to do is to get access to the element by