zyed
zyed

Reputation: 1

How to connect the angular to MongoDB

I was not able to find a way to connect my database to my user interface which I make in angular. So anyone can suggest to me how to overcome my problem by the simpler way??? needed a simpler code to rectify the error

Upvotes: 0

Views: 1168

Answers (3)

Manjeet Singh
Manjeet Singh

Reputation: 2398

the-modern-application-stack-part-4-building-a-client-ui-using-angular-2-formerly-angularjs-and-typescript

Use MongoDB Stitch

MongoDB Stitch

import { Component, OnInit } from "@angular/core";

import { StitchClientFactory } from "mongodb-stitch";

Upvotes: 2

Shubham Bhokare
Shubham Bhokare

Reputation: 116

You cannot directly communicate to any database via angular. You need to create middleware(server) using nodejs, python or any other.

Upvotes: 2

Rajat
Rajat

Reputation: 692

You can't connect the front-end directly to a database. You need a back-end for that. Check out Node.js if you're looking for something in JavaScript. There are a lot of courses for MEAN stack on Udemy. You could learn from those.

Upvotes: 1

Related Questions