Ian Davis
Ian Davis

Reputation: 19443

Angular partial not rendering

I'm trying to render a partial in Angular, but it is not rendering. Am I missing something?

Partial here: <div ng-include="partial.html"></div>
<script type="text/ng-template" id="partial.html">
  test
</script>

Upvotes: 0

Views: 251

Answers (1)

New Dev
New Dev

Reputation: 49620

ng-include expects an expression that results in a template url. If you need to pass a string, use quotes (in addition to the double-quotes of the attribute):

<div ng-include="'partial.html'"></div>

Upvotes: 1

Related Questions