components icon indicating copy to clipboard operation
components copied to clipboard

Error: Template parse errors: Can't bind to 'dataSource' since it isn't a known property of 'table'.

Open testengine999 opened this issue 6 years ago • 3 comments

I already imported in my app.module.ts but not working...

import {MatTableModule} from '@angular/material';

@NgModule({ imports: [ 'MatTableModule' ] });

My Angular Package below:

"dependencies": { "@angular/animations": "~8.2.14", "@angular/cdk": "~8.2.3", "@angular/common": "~8.2.14", "@angular/compiler": "~8.2.14", "@angular/core": "~8.2.14", "@angular/forms": "~8.2.14", "@angular/material": "^8.2.3", "@angular/platform-browser": "~8.2.14", "@angular/platform-browser-dynamic": "~8.2.14", "@angular/router": "~8.2.14", "hammerjs": "^2.0.8", "jquery": "^3.4.1", "perfect-scrollbar": "^1.5.0", "rxjs": "~6.4.0", "rxjs-compat": "^6.5.4", "tslib": "^1.10.0", "zone.js": "~0.9.1" },

Working fine with ng test like attached screenshots.

Capture2

BUT Showing Error with ng serve

Capture

testengine999 avatar Jan 31 '20 09:01 testengine999

I tried every possible things but still not success.

testengine999 avatar Jan 31 '20 09:01 testengine999

Hi,

Solved My Issue.

Missing import file to routing module.

testengine999 avatar Jan 31 '20 11:01 testengine999

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.