From 951135b634cf7c48264f988546a3a5ac856bc587 Mon Sep 17 00:00:00 2001 From: Dzulqarnain Nasir Date: Wed, 24 Sep 2014 09:56:36 +0300 Subject: [PATCH] * Changes broke unit test. Reverting to previous version. --- dateparser.directive.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/dateparser.directive.js b/dateparser.directive.js index ea90857..05d1b8c 100644 --- a/dateparser.directive.js +++ b/dateparser.directive.js @@ -5,30 +5,35 @@ angular.module('dateParserDirective', ['dateParser']) require: 'ngModel', link: function(scope, element, attrs, ngModel) { var dateFormat; - // If a new format is provided, update the view by rendering the model again. + attrs.$observe('dateParser', function(value) { dateFormat = value; - // Leave the actual rendering to other directives. Angular provides these by default for ,