From aa4f8c0b32c0269caabd6c400605ab84b5503d41 Mon Sep 17 00:00:00 2001 From: Dan Shreim Date: Thu, 4 Dec 2014 12:11:41 -0500 Subject: [PATCH] Namespace directives to futureproof --- README.md | 6 +++--- src/ngCart.directives.js | 8 ++++---- template/ngCart/summary.html | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7632a97..ff11a81 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Something like this: Renders an 'Add To Cart' Button ``` -Add To Cart +Add To Cart ``` @@ -66,7 +66,7 @@ Renders an 'Add To Cart' Button Renders a view of the cart ``` - + ``` @@ -75,7 +75,7 @@ Renders a view of the cart Renders a summary of the content of the cart (Typically used in the header bar of a website ``` - + ``` diff --git a/src/ngCart.directives.js b/src/ngCart.directives.js index f3c0459..016cfca 100644 --- a/src/ngCart.directives.js +++ b/src/ngCart.directives.js @@ -10,7 +10,7 @@ angular.module('ngCart.directives', []) }]) - .directive('addtocart', ['ngCart', function(ngCart){ + .directive('ngcartAddtocart', ['ngCart', function(ngCart){ return { restrict : 'E', controller : 'CartController', @@ -32,7 +32,7 @@ angular.module('ngCart.directives', []) }; }]) - .directive('cart', ['ngCart', function(ngCart){ + .directive('ngcartCart', ['ngCart', function(ngCart){ return { restrict : 'E', controller : 'CartController', @@ -44,7 +44,7 @@ angular.module('ngCart.directives', []) }; }]) - .directive('summary', ['ngCart', function(ngCart){ + .directive('ngcartSummary', ['ngCart', function(ngCart){ return { restrict : 'E', controller : 'CartController', @@ -52,5 +52,5 @@ angular.module('ngCart.directives', []) transclude: true, templateUrl: 'template/ngCart/summary.html' }; - }]) + }]); diff --git a/template/ngCart/summary.html b/template/ngCart/summary.html index f7495a0..a387793 100644 --- a/template/ngCart/summary.html +++ b/template/ngCart/summary.html @@ -16,6 +16,6 @@
{{ ngCart.totalItems() }} -
{{ ngCart.totalCost() | currency }} +
{{ ngCart.totalCost() | currency }}
\ No newline at end of file