The job module

We are going to continue with the job module. The reason for this is that the company module uses a component from the job module in order to display a list of available jobs for a company.

The job service

The job service will handle communication with the backend, mostly for CRUD operations. We are going to create an Angular factory to accomplish this. Create a new file called public/app/job/job.service.js and follow these steps:

  1. Define the base structure and exposed methods:
    import { Injectable } from 'angular2/core'; import { Http, Response, Headers } from 'angular2/http'; import { AuthHttp } from '../auth/index'; import { contentHeaders, serializeQuery } from '../common/index'; import { Job } from './job.model'; @Injectable() export ...

Get Web Application Development with MEAN now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.