Note that there are some explanatory texts on larger screens.

plurals
  1. POangularjs directive not run going into
    primarykey
    data
    text
    <p>Ok I have an issue with directive that lay on ng-repeat but as well without at not running.</p> <p>so this is the come</p> <p>main template:</p> <pre><code> &lt;div ng-if="[%!query.$resolved%]"&gt; &lt;div ng-cloak ng-show="query.mission_type == 0" class="animate-show"&gt; &lt;div ng-include src="'Interctive/templates/missions/plugins/open_question_plugin.html'"&gt;&lt;/div&gt; &lt;/div&gt; &lt;div ng-cloak ng-show="query.mission_type == 1" class="animate-show"&gt; [%query.type_plugin%]33 &lt;div ng-include src="'Interctive/templates/missions/plugins/american_question_plugin.html'"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>The Second template:</p> <pre><code>&lt;div&gt; &lt;div mission_item dataitem="query.forms[0]" &gt;[%query.forms%]&lt;/div&gt; &lt;div ng-repeat="item in query.forms" &gt; &lt;div mission_item dataitem="item" ng-model="item"&gt;[%item%]--&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>The directive loading:</p> <pre><code>define([ // Standard Libs 'jquery' // lib/jquery/jquery , 'Angular' // lib/angular/angular , 'directives/missions/mission_item_handler' // Application Widgets ], function ($, angular,mission_item_handler_directive) { "use strict"; Console.group("Entering Widgets module."); var directives = { "mission_item":mission_item_handler_directive }; Console.info("Registered directives: ", directives); var initialize = function (angModule) { _.each(directives, function (filter, name) { angModule.directive(name, filter[1]); }) Console.debug("Custom widgets initialized."); } Console.groupEnd(); return { initialize: initialize }; }); </code></pre> <p>the directive code:</p> <pre><code>define([ // Standard Libs 'jquery', 'text!templates/missions/plugins/open/field_text.html', 'text!templates/missions/plugins/open/field_image.html', 'text!templates/missions/plugins/open/field_youtube.html', 'text!templates/missions/plugins/open/field_textbox.html' ], function ($, field_text_template, field_image_template, field_youtube_template, field_textbox_template) { "use strict"; Console.group("Entering Directive Open Question Items Field."); var directive = ['mission_item', function ($compile) { return { restrict: 'A', replace: false, order: 9999, scope: { dataitem: "="}, link: function (scope, element, attrs) { Console.log("Entered Field Item" , scope); var templateFn; attrs.$observe('item', function (newValue) { console.log(newValue) }) /*if (item.type == "header") templateFn = $compile(field_text_template); if (item.type == "image") templateFn = $compile(field_image_template); if (item.type == "textbox") templateFn = $compile(field_textbox_template); templateFn(scope);*/ } }; }]; Console.groupEnd(); return directive; }); </code></pre> <p>now my main issue is that even if i do breakpoints within the directive its loaded but not running mean i see the output of the system that he been loaded but when i put at within the ng-reapeat(or without) its stop working and have not idea why</p> <p>any pointers?</p>
    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.
 

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