one way to do it as stated by the other folks is
'use strict';
var cors = require('cors'),
express = require('express'),
app = express(),
buildingRouter = express.Router(),
configmongo = require('../config/configmongo.js'),
MongoClient = require('mongodb').MongoClient;
console.log(configmongo.url);
var getBuildings = function ( ) {
buildingRouter.all('*', cors());
etc.....
On Tuesday, November 15, 2016 at 2:11:49 AM UTC-8, Mark Justin wrote:
>
> How to enable CORS in angularjs?
>
--
You received this message because you are subscribed to the Google Groups
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.