In short, loading directives dynamically in the way described is not possible.
There are a couple of alternatives to consider. One option is to pass your context as an attribute, as mentioned by other responses (e.g., mydir type="checkbox"). Another suggestion is to create a directive that dynamically loads another directive, also noted by others. However, these options may not be ideal in every case.
The first approach only works if you write the directive yourself, rather than utilizing frameworks like ionic. Additionally, it involves combining multiple directives into one, which can lead to a convoluted and error-prone mega directive that is challenging to test and maintain. While this method is technically correct for passing data to a directive from the view, it may not be suitable for this particular scenario.
The second option introduces complexity by obfuscating the purpose of the directives within the HTML code. For instance, using a directive named "dynamic" with dynamic data may confuse readers about its functionality. On the other hand, a directive named "dropdown" with a list parameter provides clearer insight into its intended use. Clarity and readability in code are essential considerations that should not be overlooked.
A simpler alternative that requires less effort on your part is to utilize AngularJS' ngSwitch directive:
<div ng-switch="type">
<mydir-select ng-switch-when="select"></mydir-select>
<mydir-checkbox ng-switch-when="checkbox"></mydir-checkbox>
</div>