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

Commit 7fc17c0

Browse files
author
Martin Atkins
committed
Remove /weather prefix in URLs in the weather example.
This was unnecessary and confusing.
1 parent b457ed9 commit 7fc17c0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/weather/common.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ app.config(
7171

7272
$locationProvider.html5Mode(true);
7373
$routeProvider.when(
74-
'/weather',
74+
'/',
7575
{
7676
templateUrl: '/:static/partials/choosecity.html',
7777
controller: 'chooseCityController'
7878
}
7979
);
8080
$routeProvider.when(
81-
'/weather/:city',
81+
'/:city',
8282
{
8383
templateUrl: '/:static/partials/weather.html',
8484
resolve: {
@@ -111,7 +111,7 @@ app.config(
111111
);
112112
$routeProvider.otherwise(
113113
{
114-
template: '<a href="/weather">Weather</a>'
114+
template: '<a href="/">Weather</a>'
115115
}
116116
);
117117
}

examples/weather/partials/choosecity.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ <h1>Choose a City</h1>
33
<div class="row" ng-repeat="cityRow in cityRows">
44

55
<div class="col-md-6 city" ng-repeat="city in cityRow">
6-
<a ng-href="/weather/{{ city.code }}">
6+
<a ng-href="/{{ city.code }}">
77
<img ng-src="/:static/images/cities/{{ city.code }}.jpg">
88
<span class="cityname">{{ city.displayName }}</span>
99
</a>

0 commit comments

Comments
 (0)