Fixing my modal and the tests

This commit is contained in:
Will Marshall
2014-05-20 12:17:56 +10:00
parent e7f6a9badf
commit 685ba3f63a
11 changed files with 28 additions and 25 deletions

View File

@@ -2,17 +2,14 @@ Darkswarm.directive "ofnModal", ($modal)->
restrict: 'E'
replace: true
transclude: true
scope: {}
template: "<a>{{title}}</a>"
link: (scope, elem, attrs, ctrl, transclude)->
scope.title = attrs.title
contents = null
transclude scope, (clone)->
contents = clone
scope.cancel = ->
scope.modalInstance.dismiss("cancel")
elem.on "click", ->
elem.on "click", =>
scope.modalInstance = $modal.open(controller: ctrl, template: contents)