[API] Add adapter bundle

This commit is contained in:
Victor Woeltjen 2016-05-27 16:27:47 -07:00
parent 136f2ae785
commit 7205faa6bb
2 changed files with 33 additions and 0 deletions

View File

@ -24,9 +24,26 @@ define([
var viewFactory = type.view(this.regions.main);
if (viewFactory) {
var viewKey = key + "." + this.regions.main;
this.legacyBundle.extensions.views =
this.legacyBundle.extensions.views || [];
this.legacyBundle.extensions.views.push({
name: "A view",
key: "adapted-view",
template: '<mct-view key="\'' +
viewKey +
'\'" ' +
'mct-object="domainObject">' +
'</mct-view>'
});
this.legacyBundle.extensions.newViews =
this.legacyBundle.extensions.newViews || [];
this.legacyBundle.extensions.newViews.push({
factory: viewFactory,
key: viewKey
});
}
};

16
src/adapter/bundle.js Normal file
View File

@ -0,0 +1,16 @@
define([
'legacyRegistry',
'./directives/MCTView'
], function (legacyRegistry, MCTView) {
legacyRegistry.register('adapter', {
"extensions": {
"directives": [
{
key: "mctView",
implementation: MCTView,
depends: "newViews[]"
}
]
}
});
});