Skip to content

Commit 2f9e385

Browse files
committed
make examples run in local host
1 parent fa299b8 commit 2f9e385

File tree

3 files changed

+34
-6
lines changed

3 files changed

+34
-6
lines changed

app/views/examples/search-box/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<div id="map_canvas" ng-controller="mainCtrl">
2+
3+
<script id="searchbox.tpl.html" type="text/ng-template">
4+
<input type="text" placeholder="Search">
5+
</script>
26
<ui-gmap-google-map center="map.center" zoom="map.zoom" draggable="true" options="options">
37
<ui-gmap-search-box template="searchbox.template" events="searchbox.events"></ui-gmap-search-box>
48
</ui-gmap-google-map>

app/views/examples/search-box/script.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@ angular.module('appMaps', ['uiGmapgoogle-maps'])
33
.config(['uiGmapGoogleMapApiProvider', function (GoogleMapApi) {
44
GoogleMapApi.configure({
55
// key: 'your api key',
6-
v: '3.20',
6+
// v: '3.20',
77
libraries: 'places'
88
});
99
}])
1010

11-
.run(['$templateCache', function ($templateCache) {
12-
$templateCache.put('searchbox.tpl.html', '<input type="text" placeholder="Search">');
13-
}])
14-
1511
.controller('mainCtrl', ['$scope', '$log', 'uiGmapGoogleMapApi', function ($scope, $log, GoogleMapApi) {
16-
1712
angular.extend($scope, {
1813
map: {center:
1914
{

grunt/options.coffee

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ module.exports =
2525
'autoprefixer'
2626
]
2727

28+
examples:
29+
files: ['<%= yeoman.app %>/views/examples/{,*/}*.*']
30+
tasks: [
31+
'copy:examples'
32+
]
33+
34+
2835
livereload:
2936
options:
3037
livereload: LIVERELOAD_PORT
@@ -228,6 +235,27 @@ module.exports =
228235
dest: '.tmp/styles/'
229236
src: '{,*/}*.css'
230237

238+
examples:
239+
files: [
240+
{
241+
expand: true
242+
cwd: '<%= yeoman.app %>'
243+
dest: '.tmp/'
244+
src: [
245+
'views/examples/{,*/}*.*'
246+
]
247+
}
248+
{
249+
expand: true
250+
cwd: 'dist/vendor/'
251+
dest: '.tmp/vendor'
252+
src: [
253+
'{,*/}*.*'
254+
]
255+
}
256+
]
257+
258+
231259
vendor_fonts:
232260
expand: true
233261
cwd: '<%= yeoman.dist %>/vendor/fonts'
@@ -238,6 +266,7 @@ module.exports =
238266
server: [
239267
'coffee:dist'
240268
'copy:styles'
269+
'copy:examples'
241270
]
242271
test: [
243272
'coffee'

0 commit comments

Comments
 (0)