Implementing monthly billing description logic in required pages

This commit is contained in:
Rob Harrington
2015-10-28 11:40:01 +11:00
parent 5b72f53738
commit c1d04af5cc
5 changed files with 32 additions and 37 deletions

View File

@@ -0,0 +1,8 @@
angular.module("admin.enterprises").directive "monthlyPricingDescription", (monthlyBillDescription) ->
restrict: 'E'
scope:
joiner: "@"
template: "<span ng-bind-html='billDescription'></span>"
link: (scope, element, attrs) ->
joiners = { comma: ", ", newline: "<br>" }
scope.billDescription = monthlyBillDescription.replace("{joiner}", joiners[scope.joiner])