We use (and love) mongoose in
mean.io .
We recently launched the ability to create "fullstack packages" which provide both client side code (angular directives, services, controllers, css) and server side (express routes, mongoose defined models etc.)
Take for account the next scenario - I created a
google maps package which has a map and location picker directives.
We have an existing model called articles demonstrating basic crud functionality with
mean.io.
I want the google map package to inject and alter the articles model and add a:
location -> lat/lng to the existing articles schema.
How can this be achieved? Does mongoose have some kind of hook to alter a schema on runtime?
Lior