File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "$schema" : " ../../node_modules/ng-packagr/package.schema.json" ,
33 "name" : " @angular-react/core" ,
4- "version" : " 0.2.2 " ,
4+ "version" : " 0.2.3 " ,
55 "ngPackage" : {
66 "lib" : {
77 "languageLevel" : [
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
1010 OnChanges ,
1111 SimpleChanges ,
1212 HostBinding ,
13- Input
13+ Input ,
1414} from '@angular/core' ;
1515import toStyle from 'css-to-style' ;
1616
@@ -26,7 +26,8 @@ const forbiddenAttributesAsProps: ReadonlyArray<AttributeNameAlternative> = [
2626 [ 'style' , 'rStyle' ] ,
2727] ;
2828
29- const ignoredAttributeMatchers = [ / ^ _ ? n g - ? .* / ] ;
29+ // Forbidden attributes are still ignored, since they may be set from the wrapper components themselves (forbidden is only applied for users of the wrapper components)
30+ const ignoredAttributeMatchers = [ / ^ _ ? n g - ? .* / , / ^ s t y l e $ / , / ^ c l a s s $ / ] ;
3031
3132const ngClassRegExp = / ^ n g - / ;
3233
@@ -102,7 +103,7 @@ export abstract class ReactWrapperComponent<TProps extends {}> implements AfterV
102103 public readonly elementRef : ElementRef ,
103104 private readonly changeDetectorRef : ChangeDetectorRef ,
104105 private readonly setHostDisplay : boolean = false
105- ) { }
106+ ) { }
106107
107108 ngAfterViewInit ( ) {
108109 this . _passAttributesAsProps ( ) ;
@@ -197,7 +198,7 @@ export abstract class ReactWrapperComponent<TProps extends {}> implements AfterV
197198 throw new Error (
198199 `[${ ( this . elementRef
199200 . nativeElement as HTMLElement ) . tagName . toLowerCase ( ) } ] React wrapper components cannot have the '${
200- attr . name
201+ attr . name
201202 } ' attribute set. Use the following alternative: ${ alternativeAttrName || '' } `
202203 ) ;
203204 }
You can’t perform that action at this time.
0 commit comments