joaoneto/angular-bootstrap-select — pull request #6 by MattCMultimedia (2014-03-16 22:15:46+00:00)
Title: selectpicker now stays in sync with original select's ngModel

- Removed the `restrict: 'C'` because it's uncommon in angular and causes the directive to attach to additional elements with `.selectpicker` created by the selectpicker plugin itself.
- stays in sync with the original ngModel due to the `$watch` and `$timeout`
- `$timeout` is there because without, it would sometimes conflict with a currently running `$digest` cycle, and wrapping the function in a `$timeout` is the accepted method for running a function on the next open `$digest`.
- Also incorporates the `if ngModel is undefined conditional` that others have implemented and asked for.