In Mongoose, it has a way to refer to another data definition. I wonder if there is a way we can do while we are defining a data module for angular2?
In Mongoose
var personSchema = Schema({
_id : Number,
name : String,
age : Number,
stories : [{ type: Schema.Types.ObjectId, ref: 'Story' }]
});
My question:
export class Person {
_id : number;
name : String;
age : Number;
stories : [
//sometype
]
}
via Mathers
No comments:
Post a Comment