-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(flexbox): resolve 'renderer.setStyle()' error #298
Conversation
978a897
to
bfc3f26
Compare
bfc3f26
to
a35e17b
Compare
Fixes #270 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one minor issue.
src/lib/flexbox/api/base.ts
Outdated
* To avoid dependencies on full class Renderer or Renderer, | ||
* define interface for the only method used... | ||
*/ | ||
export interface StyleRenderer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can get rid of this one and replace all the usages with the Renderer
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the BaseFxDirective
directive only uses the method setElementStyle()
using a StyleRenderer interface clearly declares the intent of the reference.
HistoryFlex-Layout (beta.8) expects a Renderer2 with function ::setStyle() to injected. Here is a Plunkr Demo <md-tab-group>
<md-tab>
<ng-template md-tab-label>
<span fxShow>tab 1 with fxShow</span>
</ng-template>
<md-card fxFlex>
<md-card-header class="md-primary">
<b>social identity</b>
</md-card-header>
<md-card-content>
hello world 1
</md-card-content>
</md-card>
</md-tab>
<md-tab label="Password" *ngIf='true'>
<md-card fxFlex>
<md-card-header class="md-primary">
<b>Local identity</b>
</md-card-header>
<md-card-content>
hello world 2
</md-card-content>
</md-card>
</md-tab>
</md-tab-group>
|
* Revert back to Renderer (from Renderer2); Injecting both Renderers causes intermittent `TypeError: _this._renderer.setStyle is not a function` errors. * Refactor the FxBaseDirective to use a StyleRenderer interface Fixes #270
a35e17b
to
f7ae4a0
Compare
Do we have any idea when beta.9 will be cut, so the update will be applied to the NPM version? |
The plan is the end-of next week! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Renderer
(fromRenderer2
)Fixes #270