A MEAN stack odd job posting web application written by Kevin Ajili, Grant Lin, Mike Hamilton, Vikram Melkote, and Jimmy Nguyen
sudo service mongod start
nodemon
or node app.js
ng serve (inside the angular CLI)
http://localhost:4200
in a web browser
-
cd <components folder>
-
ng g component <component name>
-
Create a new component
-
Create a new path in inside
app.module.ts
using{path:'<new path here>', component: <component name>Component}
-
import router into current pre path if not already inside
<pre path>.component.ts
import {Router} from'@angular/router';
-
set the router inside the pre path constructor at
<pre path>.component.ts
private router:Router
-
Create a function in pre path and set route to your new component path
this.router.navigate(['posts']);
-
Call this function on sumbit or button click to open your new path