Skip to content

Commit 7c91aba

Browse files
committed
use component tags in shared examples
1 parent ff838d4 commit 7c91aba

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

examples/viewer.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ import * as northwind from './northwind.js';
1414
import '../css';
1515

1616

17+
let tags = {};
18+
19+
Object.keys(components).forEach(name => {
20+
tags['ax-' + name.toLowerCase()] = components[name];
21+
});
22+
23+
1724
enableProdMode();
1825

1926

@@ -64,7 +71,7 @@ class AppComponent {
6471
ngOnInit(){
6572

6673
let render = (component, props) => {
67-
this.component = component;
74+
this.component = tags[component];
6875
this.inputs = props;
6976
};
7077

@@ -79,7 +86,7 @@ class AppComponent {
7986
this.showError = location.hash && !item;
8087

8188
if (typeof item == 'function'){
82-
item({render}, components, templates, data);
89+
item({render}, templates, data);
8390
}
8491

8592
this.name = name;

0 commit comments

Comments
 (0)