Two sides of web application. Part 3: Communication Layer
Foreword
In this section we will implement the communication layer for our application. It'll handle all the requests to/from our web server. Have no worries - we will create server application in the next section!
First resource
Let's create a Session
resource. Since we have no backend part, we should stub
the data. We'll use Angular Services. That's easy: a service defines a
function, returning, say, an object. That object will be used every time you
call a service. And you may use not only objects - you may return functions,
constants or literally anything from your services.