How does the front end use the function written by the back end and those modules?

  node.js, question

The UIkit of our project is Angular.js, and the language of the back end is Node.js. I just want to know how the front end and back end call each other.

Common ways:
Js provides apis (interfaces)
Angular calls API provided by node.js to add, delete, modify and check data.

There are two ready-made service available for angular calling api.
$resource (for rest api)

such as

 method: 'GET',
 url: '/someUrlProvidedByNode.js'
 }).then(function successCallback(response) {
 // this callback will be called asynchronously
 // when the response is available
 }, function errorCallback(response) {
 // called asynchronously if an error occurs
 // or server returns response with an error status.

Or ..

var User = $resource('/user/:userId', {userId:'@id'});
 var user = User.get({userId:123}, function() { = true;