diff --git a/example/index.html b/example/index.html index 9c72146..50802e0 100644 --- a/example/index.html +++ b/example/index.html @@ -38,9 +38,9 @@
-

-

-

+

+

+

diff --git a/lib/angular-floating-label.js b/lib/angular-floating-label.js index cb67c8d..992488d 100644 --- a/lib/angular-floating-label.js +++ b/lib/angular-floating-label.js @@ -9,6 +9,13 @@ link: function(scope, el, args) { var options = scope.options(); el.floatingLabel(options); + + var label = $('label[for="' + el.attr('id') + '"]'); + + args.$observe('placeholder', function(value) { + label.text(value); + }); + } }; }]);