This repository was archived by the owner on Nov 30, 2018. It is now read-only.
File tree 2 files changed +2
-19
lines changed
spec/coffee/directives/api
src/coffee/directives/api
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", ->
9
9
expect (@subject ).toBeDefined ()
10
10
@log .error .calls .reset ()
11
11
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
-
23
12
it " should load template" , ->
24
13
html = angular .element """
25
14
<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")
9
9
GoogleMapApi .then (maps) =>
10
10
# Validate attributes
11
11
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
19
13
20
14
index = if angular .isDefined scope .index and not isNaN (parseInt scope .index ) then parseInt scope .index else undefined
21
15
@@ -44,7 +38,7 @@ angular.module("uiGmapgoogle-maps.directives.api")
44
38
45
39
controlDiv .append transcludeEl
46
40
47
- pushControl (map, controlDiv, index)
41
+ pushControl (map, controlDiv . children () , index)
48
42
49
43
else
50
44
$http .get (scope .template , { cache : $templateCache })
You can’t perform that action at this time.
0 commit comments