Using AngularJs and MongoDB/Mongoose

后端 未结 2 1510
别跟我提以往
别跟我提以往 2020-12-13 11:15

I am trying to connect AngularJS with MongoDB using Mongoose. I would like to pass the Models to be used by the Controllers, so I can $scope to the data. I am not sure if I

2条回答
  •  天命终不由人
    2020-12-13 11:41

    The interim step has been provided by a npm module, angoose. It does exactly what you asked for: making the mongoose models available as Angular injectable factories. All you need to do is just including a script tag in your html file.

    angoose module:

    https://npmjs.org/package/angoose

    Disclaimer: I'm the contributor of angoose module.

提交回复
热议问题