Adding working modals

This commit is contained in:
Will Marshall
2014-05-21 14:09:48 +10:00
parent a16f726377
commit 0140472fbc
5 changed files with 12 additions and 7 deletions

View File

@@ -6,4 +6,6 @@ Darkswarm.controller "ProductNodeCtrl", ($scope) ->
else
$scope.product.price
$scope.producer = $scope.product.supplier
$scope.hasVariants = $scope.product.variants.length > 0

View File

@@ -8,7 +8,10 @@ Darkswarm.directive "ofnModal", ($modal)->
link: (scope, elem, attrs, ctrl, transclude)->
scope.title = attrs.title
contents = null
transclude scope, (clone)->
# We're using an isolate scope, which is a child of the original scope
# We have to compile the transclude against the original scope, not the isolate
transclude scope.$parent, (clone)->
contents = clone
elem.on "click", =>