Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function myInput($compile, $templateCache) {
- var directive = {
- bindToController: true,
- controller: Controller,
- controllerAs: 'vm',
- restrict: 'E',
- scope: {
- invalid: "@",
- },
- compile: function(element, attrs) {
- element.after('<div class="field-invalid">{{ vm.invalid }} - after from compile.</div>');
- },
- };
- return directive;
- }
- <input type="text" invalid="Invalid value">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement