Skip to content

Instantly share code, notes, and snippets.

@JiaLiPassion
Created June 22, 2018 06:32
Show Gist options
  • Save JiaLiPassion/dd50d111fe0afc46e06948e2d1b9e521 to your computer and use it in GitHub Desktop.
Save JiaLiPassion/dd50d111fe0afc46e06948e2d1b9e521 to your computer and use it in GitHub Desktop.
class AngularCustomElementBridge {
prepare(injector, component) {
this.componentFactory = injector.get(ComponentFactoryResolver).resolveComponentFactory(component);
// we use templateName to handle this case @Input('aliasName');
this.observedAttributes = componentFactory.inputs.map(input => input.templateName);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment