| (function(){ | |
| 'use strict'; | |
| angular | |
| .module('pqm.components') | |
| .directive('required', function(){ | |
| return { | |
| restrict: 'A', //only want it triggered for attributes | |
| compile: function(scope, element){ | |
| console.log(element); | |
| console.log(scope); | |
| //could add a check to make sure it's an input element if need be | |
| // element.context.parentNode.before("<span class='pqm-required'>*</span>"); | |
| // console.log($(this)); | |
| // element.after("<span class='pqm-required'>*</span>"); | |
| } | |
| }; | |
| }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment