From the course: Ionic 4.0 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Consuming REST APIs: Implementing methods - Ionic Tutorial
From the course: Ionic 4.0 Essential Training
Consuming REST APIs: Implementing methods
- [Instructor] The next thing we're going to go ahead and do is implement our methods. The first method we will implement is the get all activities. To implement this we'll start by saying return, this.httpclient.get and as a parameter we would would pass in our API here. Now let's explain what we've just done here from line 15 to line 17. We already had a method called get all activities from our previous videos. And what we have done is we have used the angular http client, which in turn has a get method, that allows us to make get http requests. The mandatory parameter that a get method requires is the URL for our API. We can also parse other methods, but for the sake of this course, we're not going to build beyond this scope. The get method of the angular http client, returns what we call an observable and this is something we'll talk about a little bit more in future videos. All you need to know for now, is that the get all activities method, returns an observable with some data…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Overview of Ionic UI components5m 35s
-
(Locked)
Designing the home page with cards8m 16s
-
(Locked)
Generating services4m 40s
-
(Locked)
Consuming REST APIs4m 16s
-
(Locked)
Consuming REST APIs: Implementing methods3m 3s
-
(Locked)
Creating a data model and interface4m 6s
-
(Locked)
Using a data model interface3m 54s
-
(Locked)
Finalizing the home page design10m 2s
-
-
-
-
-
-