When it comes to routing, I believe that templateUrl
is the preferred choice over template
. However, when dealing with directives, the decision between using templateUrl
or template
can be a bit more nuanced. Some developers opt to include chunks of HTML in string format as template
, while others always link their directives to a templateUrl
, even for simple and small templates.
What is the best practice for determining which option to use? Personally, I tend to lean towards utilizing templateUrl
regardless of the template's complexity because I prefer not to embed HTML within strings. That being said, I am eager to understand the rationale behind this decision beyond mere personal preference.