From: Dobrica Pavlinusic Date: Wed, 9 Jan 2013 21:13:53 +0000 (+0100) Subject: don't use custom class again on generated element X-Git-Tag: 0.4~16 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=44bf08a7c64dee98ab07ba53ead87c5d3e633bee;p=angular-drzb don't use custom class again on generated element --- diff --git a/app/js/directives.js b/app/js/directives.js index fb7b81e..2aa3a9c 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -14,10 +14,11 @@ angular.module('myApp.directives', []). restrict: 'C', compile: function(element, attrs) { var my_class = attrs['class'] || ''; + my_class = my_class.replace(/ *my-input */,''); var my_type = attrs['type'] || 'text'; - var html = '
' + var html = '
' +'' - +'' + +'' +'
' ; element.replaceWith(html);