If I add angular material directive md-button like this :
angular.element( document.body ).append( '<md-button> Material' )
It will not recognize that it's angular directive. The question is - how to recompile scope/element
Not sure if you should be doing this, but the right way is to use the $compile function:
angular.element(document.body).append($compile('<md-button> Material')($scope))
Working plunker.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With