Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix root examples #4207

Merged
merged 4 commits into from
Oct 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/backgroundlayer.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
#map {
height: 400px;
}
.backgroundlayer-selector {
width: 200px;
}
7 changes: 6 additions & 1 deletion examples/backgroundlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ exports.module = angular.module('app', [
]);


exports.module.run(/* @ngInject */ ($templateCache) => {
$templateCache.put('partials/backgroundlayer', require('./partials/backgroundlayer.html'));
});


/**
* The application-specific background layer component.
*
Expand All @@ -39,7 +44,7 @@ exports.backgroundlayerComponent = {
bindings: {
'map': '=appBackgroundlayerMap'
},
template: require('./partials/backgroundlayer.html'),
templateUrl: 'partials/backgroundlayer',
controller: 'AppBackgroundlayerController'
};

Expand Down
7 changes: 6 additions & 1 deletion examples/backgroundlayerdropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ exports.module = angular.module('app', [
]);


exports.module.run(/* @ngInject */ ($templateCache) => {
$templateCache.put('partials/backgroundlayerdropdown', require('./partials/backgroundlayerdropdown.html'));
});


/**
* The application-specific background layer component.
*
Expand All @@ -34,7 +39,7 @@ exports.backgroundlayerComponent = {
bindings: {
'map': '=appBackgroundlayerMap'
},
template: require('./partials/backgroundlayerdropdown.html'),
templateUrl: 'partials/backgroundlayerdropdown',
controller: 'AppBackgroundlayerController'
};

Expand Down
7 changes: 6 additions & 1 deletion examples/bboxquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ exports.module = angular.module('app', [
]);


exports.module.run(/* @ngInject */ ($templateCache) => {
$templateCache.put('partials/queryresult', require('./partials/queryresult.html'));
});


exports.module.value('ngeoQueryOptions', {
'limit': 20
});
Expand All @@ -44,7 +49,7 @@ exports.module.value('ngeoQueryOptions', {
*/
exports.queryresultComponent = {
controller: 'AppQueryresultController',
template: require('./partials/queryresult.html')
templateUrl: 'partials/queryresult'
};

exports.module.component('appQueryresult', exports.queryresultComponent);
Expand Down
7 changes: 6 additions & 1 deletion examples/measure.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ exports.module = angular.module('app', [
]);


exports.module.run(/* @ngInject */ ($templateCache) => {
$templateCache.put('partials/measuretools', require('./partials/measuretools.html'));
});


/**
* App-specific component wrapping the measure tools. The component's
* controller has a property "map" including a reference to the OpenLayers
Expand All @@ -50,7 +55,7 @@ exports.measuretoolsComponent = {
'lang': '=appMeasuretoolsLang'
},
controller: 'AppMeasuretoolsController',
template: require('./partials/measuretools.html')
templateUrl: 'partials/measuretools'
};

exports.module.component('appMeasuretools', exports.measuretoolsComponent);
Expand Down
2 changes: 1 addition & 1 deletion examples/partials/backgroundlayer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<select class="form-control"
<select class="form-control backgroundlayer-selector"
ng-options="layer.name for layer in ::$ctrl.bgLayers"
ng-model="$ctrl.bgLayer" ng-change="$ctrl.change()">
</select>
2 changes: 1 addition & 1 deletion examples/partials/backgroundlayerdropdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$ctrl.currentBgLayer.name}}
</button>
<ul class="dropdown-menu" role="menu">
<li ng-repeat="layer in ::$ctrl.bgLayers">
<li class="dropdown-item" ng-repeat="layer in ::$ctrl.bgLayers">
<a href ng-click="$ctrl.setLayer(layer)">{{::layer.name}}</a>
</li>
</ul>
Expand Down