Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should show more of your code. I have a directive that I'm using to dynamically load and use different templates using an ng-include in the template of my directive. Seeing as how this works I can't imagine what you would be doing that would be causing the ng-include not to work. Have you checked the inspector or whatever to see that it loads your HTMLPage.html or gets a 404?</p> <pre><code>directive("dynamicFormInput", ['$http', '$templateCache', function($http, $templateCache){ return { restrict: 'E', scope: {model: '=', section: '='}, template: '&lt;ng:include src="tpl"&gt;&lt;/ng:include&gt;', link: function(scope, iElement, iAttrs) { switch(scope.section.sectionTypeId) { case 1: $http.get('partials/survey/textInput.html', {cache:$templateCache}); scope.tpl="partials/survey/textInput.html"; break; case 2: $http.get('partials/survey/selectOneOption.html', {cache:$templateCache}); scope.tpl="partials/survey/selectOneOption.html"; break; case 3: $http.get('partials/survey/multiSelectOption.html', {cache:$templateCache}); scope.tpl="partials/survey/multiSelectOption.html"; break; case 4: $http.get('partials/survey/boolean.html', {cache:$templateCache}); scope.tpl="partials/survey/boolean.html"; break; case 5: $http.get('partials/survey/multiSelectOption.html', {cache:$templateCache}); scope.tpl="partials/survey/multiSelectOption.html"; break; case 6: if(scope.section.sectionId == 19){ $http.get('partials/survey/addressSelection.html', {cache:$templateCache}); scope.tpl="partials/survey/addressSelection.html"; } break; } } } }]) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload