components icon indicating copy to clipboard operation
components copied to clipboard

[Tabs] Example - no content displayed - docs outdated

Open atodd-geoplan opened this issue 9 years ago • 6 comments

Bug, feature request, or proposal:

Outdated document

What is the expected behavior?

When viewing a Tab, its content should be displayed

What is the current behavior?

Tab content is not displayed

What are the steps to reproduce?

Copy the tabs example from the docs

What is the use-case or motivation for changing an existing behavior?

Basic usage

Which versions of Angular, Material, OS, browsers are affected?

Is there anything else we should know?

Update the docs - the examples are missing the template tab for content this is how it should be:

  <md-tab>
    <template md-tab-label>
      <md-icon>thumb_down</md-icon> The worst sushi
    </template>
    <template md-tab-content>
      <h1>Terrible sushi restaurants</h1>
      <p>...</p> 
    </template>
  </md-tab>

atodd-geoplan avatar Dec 09 '16 10:12 atodd-geoplan

@atodd-geoplan md-tab-content was removed in alpha.10. You didn't provide the version of material you're using, so I'm guessing it's out of date. Closing this issue, feel free to open a new one with more information if you're seeing something not working in alpha.11

jelbourn avatar Dec 09 '16 17:12 jelbourn

@jelbourn Thanks, but then I'm even more confused. I have installed following the guide, which leaves you with:

"material2": "^2.0.0-alpha.6-2",

So how to get v10/11 ?

npm update @angular/material2 updates it apparently, but why this banana skin (not latest by default - its all alpha right)?:

atodd-geoplan avatar Dec 11 '16 10:12 atodd-geoplan

@jelbourn This is an aside. The issue persists through to latest version:

"@angular/material": "^2.0.0-alpha.11-3",

I still need the the tab-content wrapper to see it ...

I am really really confused, because I can see in the latest source here on github there is no tab-content any more, but it does exist in my local node_modules...

atodd-geoplan avatar Dec 11 '16 10:12 atodd-geoplan

@jelbourn would it be possible to add a tab group example to your material2-app example?

atodd-geoplan avatar Dec 11 '16 10:12 atodd-geoplan

@atodd-geoplan npm doesn't understand the alpha.xx-yy syntax; your best best is to point to a specific version, especially while we're still changing APIs in alpha. I recommend manually setting the dependency, clearing your node_modules, and re-installing with npm (not yarn, which has issues).

jelbourn avatar Dec 12 '16 21:12 jelbourn

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.