Skip to content
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

DI injects wrong Renderer when using Tabs + Flex-Layout #4704

Closed
ThomasBurleson opened this issue May 21, 2017 · 2 comments
Closed

DI injects wrong Renderer when using Tabs + Flex-Layout #4704

ThomasBurleson opened this issue May 21, 2017 · 2 comments

Comments

@ThomasBurleson
Copy link

ThomasBurleson commented May 21, 2017

Bug, feature request, or proposal:

Flex-Layout (beta.8) expects a Renderer2 with function ::setStyle() to injected.
Using M2 (beta.5) with the following setup, a Renderer::setElementStyle() is incorrectly injected.

This appears to be related to the way that M2 handles <ng-template>:

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>

screen shot 2017-05-20 at 1 30 33 pm

When the fxShow used inside the <ng-template> is removed, then errors no longer manifest.

Refs angular/flex-layout#270

@ThomasBurleson ThomasBurleson changed the title DI injects wrong Renderer with Tabs + Flex-Layout DI injects wrong Renderer when using Tabs + Flex-Layout May 21, 2017
@ThomasBurleson
Copy link
Author

This appears to be a flex-layout issue. And a Angular DI issue.
Closing here as not an Angular Material concern.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant