Skip to content

Commit eebd50c

Browse files
Arty26lahiruz
authored andcommitted
Update routes definition in the readme
1 parent 8cda579 commit eebd50c

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

README.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,35 @@ There are several demonstration files available in this template.
120120

121121
## Routes
122122

123-
All the route definitions should be included in this file based on higher priority first. In this example project following route is added to retrieve the summary.
123+
```
124+
├── /conf/
125+
│ └── routes
126+
```
127+
128+
* All the route definitions should be included in this file based on higher priority first. In this example project following route is added to retrieve the summary.
124129

125130
```
126131
GET /summary controllers.HomeController.appSummary()
127132
```
128133

129-
```
130-
├── /conf/
131-
│ └── routes
134+
* The below service is there in the front-end to manage the http requests which defined in the backend service.
135+
136+
```javascript
137+
@Injectable()
138+
export class AppService {
139+
private serviceUrl = '/summary';
140+
141+
constructor(private http: HttpClient) {
142+
}
143+
144+
/**
145+
* Makes a http get request to retrieve the welcome message from the backend service.
146+
*/
147+
public getWelcomeMessage() {
148+
return this.http.get(this.serviceUrl)
149+
.map(response => response)
150+
}
151+
}
132152
```
133153

134154
## Components

ui/src/app/app.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class AppService {
1515
}
1616

1717
/**
18-
* Makes a http get request to retrieve the welcome message.
18+
* Makes a http get request to retrieve the welcome message from the backend service.
1919
*/
2020
public getWelcomeMessage() {
2121
return this.http.get(this.serviceUrl)

0 commit comments

Comments
 (0)