I was looking for a very simple and basic implementation of Breeze with AngularJS and Node. I found ZZa and Hot Towel but then found something very basic here
It's a simple notes app based on nodejs express, breezejs, social cms and angularjs.
I want to assign a page to a series of notes. Right now the structure is such that all notes get displayed on the home screen and each note links to a detail page based on a route assignment. Lets say I want 4 of the notes to belong to a page as a collection and another series of notes to belong to another page as another collection.
Let me know if I'm on the right path:
I added the following params to the route in app.js
{ object_type: 'page', object_prefix: '/breeze/pages' }
Inside the BreezeDataContext factory, under the init method I added.
metadataStore.addEntityType({
shortName: 'page',
namespace: 'appnamespace',
defaultResourceName: 'page',
dataProperties: {
_id: {
dataType: DT.Int32
},
guid: {
dataType: DT.Guid,
isNullable: false,
isPartOfKey: true
},
owner: {
dataType: ownerType,
},
scope: {
dataType: ownerType,
isScalar: false
},
name: {
dataType: DT.String
}
}
});
Is it right to add another entityType to the metadata store or should everything go under one obect? Also how do I connect the pages with the notes? I think there should be a foreign key in the metadata but I'm not sure how to assign it.