O'Reilly logo

Web Application Development with MEAN by Robert Onodi, Adrian Mejia, Amos Q. Haviv

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The job backend module

This module will implement all of the backend logic related to jobs. We are going to define the necessary models and controllers. Only the most important parts of the module will be explained.

The job model

The job model will define a single entity from the Jobs collection and is going to handle the necessary validation when creating a new job. As for the company model, we are going to use a custom variable file for job industries and types. The two files will be located at jobboard/config/variables/industries.js and jobboard/config/variables/jobtypes.js, respectively. Both export a list of objects.

In order to implement the job model, we are going to follow these steps:

  1. Create the model file, called jobboard/app/models/job.js ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required