This repository was archived by the owner on Nov 30, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +2
-19
lines changed
spec/coffee/directives/api
src/coffee/directives/api Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Original file line number Diff line number Diff line change @@ -9,17 +9,6 @@ describe "directives.api.control", ->
99 expect (@subject ).toBeDefined ()
1010 @log .error .calls .reset ()
1111
12- it " should log error if no template is supplied" , ->
13- html = angular .element """
14- <ui-gmap-google-map center="map.center" zoom="map.zoom">
15- <ui-gmap-map-control></ui-gmap-map-control>
16- </ui-gmap-google-map>
17- """
18- element = @ compile (html)(@scope )
19- @rootScope .$apply ()
20- expect (@log .error ).toHaveBeenCalledWith (' mapControl: could not find a valid template property or elements for transclusion' )
21- @log .error .calls .reset ()
22-
2312 it " should load template" , ->
2413 html = angular .element """
2514 <ui-gmap-google-map center="map.center" zoom="map.zoom">
Original file line number Diff line number Diff line change @@ -9,13 +9,7 @@ angular.module("uiGmapgoogle-maps.directives.api")
99 GoogleMapApi .then (maps) =>
1010 # Validate attributes
1111
12- transcludedContent = transclude ()
13-
14- hasTranscludedContent = transclude ().length > 0
15-
16- if ! hasTranscludedContent && angular .isUndefined scope .template
17- @$log .error ' mapControl: could not find a valid template property or elements for transclusion'
18- return
12+ hasTranscludedContent = angular .isUndefined scope .template
1913
2014 index = if angular .isDefined scope .index and not isNaN (parseInt scope .index ) then parseInt scope .index else undefined
2115
@@ -44,7 +38,7 @@ angular.module("uiGmapgoogle-maps.directives.api")
4438
4539 controlDiv .append transcludeEl
4640
47- pushControl (map, controlDiv, index)
41+ pushControl (map, controlDiv . children () , index)
4842
4943 else
5044 $http .get (scope .template , { cache : $templateCache })
You can’t perform that action at this time.
0 commit comments