components icon indicating copy to clipboard operation
components copied to clipboard

CDK and FlexLayoutModule combo not working

Open MatteoNY opened this issue 9 years ago • 4 comments

FYI: Did a test using Angular 5 with Angular Mix YouTube video: "Angular CDK: The Component Dev Kit by Jeremy Elbourn" example works as expected. Then added code to same project I wanted to add Material Design Expand and MomentDateAdapter from "Angular UP Elad Bezalel - Angular Material CDK, Datatables and more | AngularUP 2017"

In Elad's example which is cool, looks like the FlexLayoutModule may have an issue with CDK. Not sure if FlexLayoutModule is compatible with CDK.

This is not an issue for me. The CDK is cool and I want to use it. I'm hoping for more examples and documentation are posted soon. Looking to build dynamic component and Flex may be helpful.

I did change the order of the imports and that did not help. If I remove FlexLayoutModule then CDK is fine.

I hope the above helps.

Best, Matt

Get the following error: ERROR TypeError: _this._renderer.addClass is not a function at eval (webpack-internal:///../../../common/esm5/common.js:2283) at Array.forEach () at NgClass._toggleClass (webpack-internal:///../../../common/esm5/common.js:2281) at eval (webpack-internal:///../../../common/esm5/common.js:2241) at Array.forEach () at NgClass._applyInitialClasses (webpack-internal:///../../../common/esm5/common.js:2241) at NgClass.set [as klass] (webpack-internal:///../../../common/esm5/common.js:2133) at ClassDirective.set [as classBase] (webpack-internal:///../../../flex-layout/@angular/flex-layout.es5.js:2879) at updateProp (webpack-internal:///../../../core/esm5/core.js:12538) at checkAndUpdateDirectiveInline (webpack-internal:///../../../core/esm5/core.js:12247)

Current stack installed:

Angular CLI: 1.5.0-rc.8 Node: 8.1.4 OS: win32 x64 Angular: 5.0.0-rc.9 ... animations, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dynamic, router

@angular/cdk: 2.0.0-beta.12 @angular/cli: 1.5.0-rc.8 @angular/flex-layout: 2.0.0-beta.9 @angular/material: 2.0.0-beta.12 @angular-devkit/build-optimizer: 0.0.31 @angular-devkit/core: 0.0.20 @angular-devkit/schematics: 0.0.34 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.8.0-rc.8 @schematics/angular: 0.0.49 typescript: 2.5.3 webpack: 3.8.1

What is the expected behavior?

What is the current behavior?

What are the steps to reproduce?

Providing a StackBlitz/Plunker (or similar) is the best way to get the team to see your issue.
Plunker starter (using on @master): https://goo.gl/uDmqyY
StackBlitz starter (using latest npm release): https://goo.gl/wwnhMV

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

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

Is there anything else we should know?

MatteoNY avatar Oct 31 '17 16:10 MatteoNY

That's because the latest release of Angular Material has no support for Angular 5 and it appears that it will come in the next release (in commit 5cef1dc13d39fea1a34f87226f41acc9ca1c2249).

EdricChan03 avatar Nov 02 '17 01:11 EdricChan03

Actually you just need the beta.10 release of @angular/flex-layout, the stracktrace does not mention material or the cdk.

reppners avatar Nov 02 '17 13:11 reppners

Yeah, this was an issue with flex-layout which the latest release should fix.

jelbourn avatar Nov 03 '17 22:11 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.