Skip to content
This repository was archived by the owner on Nov 30, 2018. It is now read-only.

Commit 75f3bc4

Browse files
authored
Merge pull request #1990 from anterioforks/angular-1.6
$http's deprecated custom callback methods
2 parents 3b82ee7 + 282187e commit 75f3bc4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/coffee/directives/api/control.coffee

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ angular.module("uiGmapgoogle-maps.directives.api")
4242

4343
else
4444
$http.get(scope.template, { cache: $templateCache })
45-
.success (template) =>
45+
.then (template) =>
4646
templateScope = scope.$new()
47-
controlDiv.append template
47+
controlDiv.append template.data
4848

4949
# if a controller is defined on the directive then add it to the template
5050
if angular.isDefined scope.controller
@@ -54,7 +54,7 @@ angular.module("uiGmapgoogle-maps.directives.api")
5454
# use children() rather than content() as the former seems to trim the content
5555
control = $compile(controlDiv.children())(templateScope)
5656

57-
.error (error) =>
57+
.catch (error) =>
5858
@$log.error 'mapControl: template could not be found'
5959
.then =>
6060
pushControl(map, control, index)

src/coffee/directives/search-box.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ angular.module('uiGmapgoogle-maps')
4242
$templateCache.put 'uigmap-searchbox-default.tpl.html', '<input type="text">'
4343
scope.template = 'uigmap-searchbox-default.tpl.html'
4444
$http.get(scope.template, { cache: $templateCache })
45-
.success (template) =>
45+
.then (template) =>
4646
if angular.isUndefined scope.events
4747
@$log.error 'searchBox: the events property is required'
4848
return
@@ -51,6 +51,6 @@ angular.module('uiGmapgoogle-maps')
5151
if not maps.ControlPosition[ctrlPosition]
5252
@$log.error 'searchBox: invalid position property'
5353
return
54-
new SearchBoxParentModel(scope, element, attrs, map, ctrlPosition, $compile(template)(scope))
54+
new SearchBoxParentModel(scope, element, attrs, map, ctrlPosition, $compile(template.data)(scope))
5555
new SearchBox()
5656
]

0 commit comments

Comments
 (0)