2.0.0 Can't bind to 'ngClass' since it isn't a known property of 'div'.
See original GitHub issueimport {Component} from '@angular/core';
@Component({
selector: 'left-nav',
template:`
<div [ngClass]="'first second'">aaaaabbbbbcccc</div>
`
})
export class LeftNav {
constructor(){}
}
Can't bind to 'ngClass' since it isn't a known property of 'div'. ("
<div [ERROR ->][ngClass]="">aaaaabbbbbcccc</div>
"): LeftNav@1:9
If I remove [ngClass]="'first second'"
it works ok.
window 10 Angular version: 2.0.0 Browser: chrome Language: TypeScript 2.0.2 Node (for AoT issues): 5.7.0
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Can't bind to 'ngClass' since it isn't a known property of 'input ...
Show activity on this post. In my project I'm using lazy loading So, In my registration module I'm using [ngClass] directive to add...
Read more >Common errors in Angular: Can't bind to since it isn't a known ...
Ever made an Angular application , opened your console and saw an error message similar to: “Can't bind to ngclass since it isn't...
Read more >can't bind to 'options' since it isn't a known property of 'span ...
If 'md-input' is an Angular component and it has 'type' input, then verify that it is part of this module. If 'md-input' is...
Read more >angular/angular-cli - Gitter
I'm trying to upgrade to rc.6 and have a problem i can't seem to fix Unhandled ... errors: Can't bind to 'ngClass' since...
Read more >ngStyle refuses to work because "it isn't a known property of div"
FYI, when you do see that error message, it means something isn't imported correctly. In this case, CommonModule wasn't being imported, probably ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Import CommonModule.
This issue doesn’t fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag
angular
.If you are wondering why we don’t resolve support issues via the issue tracker, please check out this explanation.
Try with [ngClass]=“first second” .