From 734bbe23dad013322c2d81f9d1da0adea8acf9ed Mon Sep 17 00:00:00 2001 From: Xample Date: Sun, 28 Dec 2014 17:13:27 +0400 Subject: [PATCH] Update index.js Added support for custom delimiters --- dist/index.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/dist/index.js b/dist/index.js index e6ffe3f..129881e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -473,7 +473,10 @@ Module.directive('dateTime', function ($compile, $document, $filter, dateTimeCon }; }); -angular.module("datePicker").run(["$templateCache", function($templateCache) { +angular.module("datePicker").run(["$templateCache","$interpolate", function($templateCache,$interpolate) { + + var startSym = $interpolate.startSymbol(); + var endSym = $interpolate.endSymbol(); $templateCache.put("templates/datepicker.html", "
\n" + @@ -482,11 +485,11 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) { " \n" + " \n" + " ‹\n" + - " {{date|date:\"yyyy MMMM\"}}\n" + + " "+startSym+"date|date:\"yyyy MMMM\""+endSym+"\n" + " ›\n" + " \n" + " \n" + - " {{ day|date:\"EEE\" }}\n" + + " "+startSym+" day|date:\"EEE\" "+endSym+"\n" + " \n" + " \n" + " \n" + @@ -505,7 +508,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) { " \n" + " \n" + " ‹\n" + - " {{years[0].getFullYear()}}-{{years[years.length-1].getFullYear()}}\n" + + " "+startSym+"years[0].getFullYear()"+endSym+"-"+startSym+"years[years.length-1].getFullYear()"+endSym+"\n" + " ›\n" + " \n" + " \n" + @@ -527,7 +530,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) { " \n" + " \n" + " ‹\n" + - " {{ date|date:\"yyyy\" }}\n" + + " "+startSym+" date|date:\"yyyy\" "+endSym+"\n" + " ›\n" + " \n" + " \n" + @@ -536,7 +539,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) { " \n" + " {{month|date:'MMM'}}\n" + + " ng-click=\"setDate(month)\">"+startSym+"month|date:'MMM'"+endSym+"\n" + "\n" + " \n" + " \n" + @@ -548,7 +551,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) { " \n" + " \n" + " ‹\n" + - " {{ date|date:\"dd MMMM yyyy\" }}\n" + + " "+startSym+" date|date:\"dd MMMM yyyy\" "+endSym+"\n" + " ›\n" + " \n" + " \n" + @@ -568,7 +571,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) { " \n" + " \n" + " ‹\n" + - " {{ date|date:\"dd MMMM yyyy\" }}\n" + + " "+startSym+" date|date:\"dd MMMM yyyy\" "+endSym+"\n" + " \n" + " ›\n" + " \n" + @@ -578,7 +581,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) { " \n" + " {{minute|date:\"HH:mm\"}}\n" + + " ng-click=\"setDate(minute)\">"+startSym+"minute|date:\"HH:mm\""+endSym+"\n" + " \n" + " \n" + " \n" + @@ -589,7 +592,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) { " \n" + " \n" + " ‹\n" + - " {{ date|date:\"dd MMMM yyyy\" }}\n" + + " "+startSym+" date|date:\"dd MMMM yyyy\" "+endSym+"\n" + " \n" + " ›\n" + " \n" + @@ -599,7 +602,7 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) { " \n" + " {{exactMinute|date:\"HH:mm\"}}\n" + + " ng-click=\"setDate(exactMinute)\">"+startSym+"exactMinute|date:\"HH:mm\""+endSym+"\n" + " \n" + " \n" + " \n" + @@ -624,4 +627,4 @@ angular.module("datePicker").run(["$templateCache", function($templateCache) { ); }]); -})(angular); \ No newline at end of file +})(angular);