Sunday, 15 September 2013

Simple AngularJS directive with attributes is not working -


I have made simple instructions with some of the parameters passed, but my parameters are not taken from the template using the code. (They are not displayed on the page, no error is displayed). I used '@' instead of '' 'but there was no real improvement.

I just want to display my directive code in my director code :) Thanks for the help.

Usage Code:

Fine-Defective-Directorate Correctly = '111' OK Pattern = '11 'Doskoot =' 222 'Defect Reporting = '11' & gt; ; & Lt; / Fine Defective-Instructions & gt;

Director code:

  Application. Directive Directive ('Fixed faulty directive', function () {return {restrict: 'E', templateUrl: 'src / dashboard / view / fill_flolite html', // replace: true, scope: {OK: '=' , Fine path: '=', fauntCount: '=', attribute of mistake: '='}, link: function (scope, elem, attrs) {console.log};}};});  

Simple template URL:

  {{faultPercentage}}% - {{faultCount}}  
< P>

Characteristic of fineCount, finePercentage, faultCount, the default is the name of the common name (such as the name of the instruction), so if you want to set it to an element , Then every attribute name must be counted, fine-per-cent, fault-count, fault-percent ...

I hope I have helped.


No comments:

Post a Comment