File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
app/views/examples/map-control Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 4
4
</ script >
5
5
< ui-gmap-google-map center ="map.center " zoom ="map.zoom " draggable ="true " options ="options ">
6
6
< ui-gmap-map-control template ="control.tpl.html " position ="top-right " controller ="controlCtrl " index ="-1 "> </ ui-gmap-map-control >
7
+ < ui-gmap-map-control >
8
+ < div ng-controller ="inlineControlCtrl ">
9
+ < button class ="btn btn-sm btn-primary " ng-class ="{'btn-warning': danger} " ng-click ="controlClick() "> {{controlText}}</ button >
10
+ </ div >
11
+ </ ui-gmap-map-control >
7
12
</ ui-gmap-google-map >
8
- </ div >
13
+ </ div >
Original file line number Diff line number Diff line change @@ -10,4 +10,13 @@ angular.module('appMaps', ['uiGmapgoogle-maps'])
10
10
$scope . danger = ! $scope . danger ;
11
11
alert ( 'custom control clicked!' ) ;
12
12
} ;
13
- } ) ;
13
+ } )
14
+ . controller ( 'inlineControlCtrl' , function ( $scope ) {
15
+ $scope . controlText = 'I\'m a custom control from inline template' ;
16
+ $scope . danger = false ;
17
+ $scope . controlClick = function ( ) {
18
+ $scope . danger = ! $scope . danger ;
19
+ alert ( 'custom control from inline template clicked!' ) ;
20
+ } ;
21
+
22
+ } ) ;
You can’t perform that action at this time.
0 commit comments