question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mat-list-item-content does not receive an ngcontent attribute

See original GitHub issue

How can we customize mat-list-item-content (with css for example) ?

Angular + Material :

"dependencies": {
    "@angular/animations": "^6.0.3",
    "@angular/cdk": "^6.2.1",
    "@angular/common": "^6.0.3",
    "@angular/compiler": "^6.0.3",
    "@angular/core": "^6.0.3",
    "@angular/forms": "^6.0.3",
    "@angular/http": "^6.0.3",
    "@angular/material": "^6.2.1",
    "@angular/platform-browser": "^6.0.3",
    "@angular/platform-browser-dynamic": "^6.0.3",
    "@angular/router": "^6.0.3",
    "core-js": "^2.5.4",
    "hammerjs": "^2.0.8",
    "rxjs": "^6.0.0",
    "smoothscroll-polyfill": "^0.4.3",
    "zone.js": "^0.8.26"
  },

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
epelccommented, Jun 21, 2018

You scope the styles with an element selector. It’s not too bad but still not the best.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 9, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mat-list-item-content does not receive an ngcontent attribute
For some reason it's not getting the ngcontent attributes added to it. You can temporarily work around this by using ViewEncapsulation.None on ...
Read more >
Angular 4 ng-content select not working on dynamically ...
I am using the ComponentFactoryResolver to dynamically create an element to be inserted into my template, which uses ng-content for transclusion ...
Read more >
Angular 2 — Using NgContent - Medium
The 'select' attribute should be an HTML selector (tag name, class, id etc). Content should be wrapped in a suitable, matching element in...
Read more >
Angular ng-content and Content Projection: A Complete Guide ...
As we know, normal HTML inputs cannot display an image. But this component does look like a native input, as it also has...
Read more >
Content projection - Angular
If your component includes an <ng-content> element without a select attribute, that instance receives all projected components that do not match any of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found