I\'m trying to make directive with differtent templates based on scope value.
This is what i done so far which i don\'t know why doesn\'t work http://jsbin.com/mibey
1) You are passing content as attribute in your html. Try this:
element.html(getTemplate(attrs.content)).show();
instead of:
element.html(getTemplate(scope.content)).show();
2) data part of directive is getting compiled so you should use something else. Instead of data-type, e.g. datan-type.
Here is the link:
http://jsbin.com/mibeyotu/6/edit