Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

import of FlexLayoutModule #178

Closed
tmburnell opened this issue Feb 10, 2017 · 9 comments · Fixed by #179
Closed

import of FlexLayoutModule #178

tmburnell opened this issue Feb 10, 2017 · 9 comments · Fixed by #179

Comments

@tmburnell
Copy link

Today I updated my Flex-Layout to beta.5 and the app fails to even load due to FlexLayoutModule calling a lambda function. After some research I saw we should not use forRoot anymore. So I removed it.

Then I ran into an issue where FlexLayoutModule is undefined when trying to import it.

I have found if i point my import to : "@angular/flex-layout/flexbox"
that it works fine, but if i use the high level import it fails.

This could be related to #175

@tmburnell
Copy link
Author

#174

@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Feb 10, 2017

@see #176 (comment)

ThomasBurleson added a commit that referenced this issue Feb 10, 2017
… ngc+aot

* 'forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
* clarify changes to FlexLayoutModule.forRoot()

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
ThomasBurleson added a commit that referenced this issue Feb 10, 2017
… ngc+aot

* 'forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
* clarify changes to FlexLayoutModule.forRoot()

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
ThomasBurleson added a commit that referenced this issue Feb 10, 2017
*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
@ThomasBurleson ThomasBurleson added the has pr A PR has been created to address this issue label Feb 10, 2017
ThomasBurleson added a commit that referenced this issue Feb 10, 2017
*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
tinayuangao pushed a commit that referenced this issue Feb 10, 2017
…179)

*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes #174, Fixes #175, Fixes #176, Fixes #178.
@tmburnell
Copy link
Author

tmburnell commented Feb 13, 2017

Just to confirm the understanding ... if i used this I was getting an error because FlexLayoutModule was undefined

import { MaterialModule }   from "@angular/material";
import { FlexLayoutModule } from "@angular/flex-layout";


@NgModule({
    imports: [
        MaterialModule.forRoot(),
        FlexLayoutModule
    ]

However if i used this it worked correctly.

import { MaterialModule }   from "@angular/material";
import { FlexLayoutModule } from "@angular/flex-layout/flexbox";


@NgModule({
    imports: [
        MaterialModule.forRoot(),
        FlexLayoutModule
    ]

However my understanding was that I should be able to leave my path for my input the same. And I am not sure the ticket #176 resolves this issue or not.

@pigeonvictor
Copy link

Same issue for me, had to change from "@angular/flex-layout" to from "@angular/flex-layout/flexbox" in order to make it work.

@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Feb 22, 2017

@pigeonvictor - which version of @angular/flex-layout do you have installed. Are you using Angular CLI (which version)?

@here - please note that our Plunkrs work as expected... https://plnkr.co/edit/sMh5vKrVQAglBq2MSSrr?p=preview.

@ThomasBurleson
Copy link
Contributor

@tmburnell, @pigeonvictor - can you zip your project (without the node_modules) and send to me via email ([email protected]). I am unable to reproduce this issue.

@ThomasBurleson ThomasBurleson added needs: demo and removed has pr A PR has been created to address this issue labels Feb 23, 2017
@tmburnell
Copy link
Author

Building an example: with the newest material and flex-layout ... it works.
I noticed that material just removed forRoot also (in the last few days).

But it does seem to work fine now.

@angular angular locked and limited conversation to collaborators Feb 27, 2017
@ThomasBurleson
Copy link
Contributor

Closing as no longer valid.

@angular angular unlocked this conversation Feb 27, 2017
karlhaas pushed a commit to karlhaas/flex-layout that referenced this issue May 3, 2017
…ngular#179)

*  ‘forRoot()' fn is never evaluated in AoT, ngc only analyzes the content of the fn to get the module and ngc does not know what to do with the first statetement (console.warn)
*  clarify changes to FlexLayoutModule.forRoot()
*  updates dependency to minimum of Angular v2.3.1.

Refs http://github.com/angular/angular#14410
Fixes angular#174, Fixes angular#175, Fixes angular#176, Fixes angular#178.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants