From 979b225d48076a6fc7d396171a9a88deede1bb79 Mon Sep 17 00:00:00 2001 From: Andreas Loukakis Date: Mon, 22 Dec 2014 22:55:29 +0200 Subject: [PATCH] Removed hard coded interpolation If not using default interpolation, tamplate will not work. Added start and end symbols as variables from interpolate service provider. --- dist/angular-prompt.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dist/angular-prompt.js b/dist/angular-prompt.js index 059c30b..653d3e1 100644 --- a/dist/angular-prompt.js +++ b/dist/angular-prompt.js @@ -100,32 +100,34 @@ angular.module('cgPrompt').controller('cgPromptCtrl',['$scope','options','$timeo }]); -angular.module('cgPrompt').run(['$templateCache', function($templateCache) { +angular.module('cgPrompt').run(['$templateCache', '$interpolate', function($templateCache, $interpolate) { 'use strict'; + var istart = $interpolate.startSymbol(); + var iend = $interpolate.endSymbol(); $templateCache.put('angular-prompt.html', "
\n" + "
\n" + " \n" + - "

{{options.title}}

\n" + + "

" + istart + "options.title" + iend + "

\n" + "
\n" + "
\n" + "\n" + "

\n" + - " {{options.message}}\n" + + " " + istart + "options.message" + iend + "\n" + "

\n" + "\n" + "
\n" + "
\n" + - " \n" + - " \n" + + " \n" + + " \n" + "
\n" + - " \n" + + " \n" + "\n" + "
\n" + " \n" + " \n" + "
\n" + "
\n" + @@ -134,7 +136,7 @@ angular.module('cgPrompt').run(['$templateCache', function($templateCache) { "\n" + "
\n" + "
\n" + - " \n" + + " \n" + "
\n" + "
" );