Add $$ngIsClass class accessor to support older browsers

This commit is contained in:
arai
2018-05-01 21:12:13 +09:00
parent d0b8c336b2
commit f361ac5b90
+3
View File
@@ -27,6 +27,9 @@ export function react2angular<Props>(
return { return {
bindings: fromPairs(names.map(_ => [_, '<'])), bindings: fromPairs(names.map(_ => [_, '<'])),
controller: ['$element', ...injectNames, class extends NgComponent<Props> { controller: ['$element', ...injectNames, class extends NgComponent<Props> {
static get $$ngIsClass() {
return true;
}
injectedProps: { [name: string]: any } injectedProps: { [name: string]: any }
constructor(private $element: IAugmentedJQuery, ...injectedProps: any[]) { constructor(private $element: IAugmentedJQuery, ...injectedProps: any[]) {
super() super()