Commit d31206f9 authored by eileen's avatar eileen
Browse files

Reinstate parsing of data from the form

This means that data can be set in an embedded form e.g

 <af-entity data='{name_a : options.name_a,  name_b : options.name_b, is_name_b_nickname: options.is_name_b_nickname, is_name_b_inferior: options.is_name_b_inferior}' .... />

In this case the options.name_as comes from the directive that instantiates this afform
parent b17b330a
......@@ -20,7 +20,10 @@
this.registerEntity = function registerEntity(entity) {
schema[entity.modelName] = entity;
data[entity.modelName] = [];
// Permitting entity.data allows the afform to specify variables like
// that has been passing into the afform with the directive that initiates it.
// This is an advanced usage & afJoin is more normal.
data[entity.modelName] = entity.data || {};
};
this.getEntity = function getEntity(name) {
return schema[name];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment