Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular4 aot compilation #236

Closed
daniele-zurico opened this issue Mar 27, 2017 · 11 comments
Closed

angular4 aot compilation #236

daniele-zurico opened this issue Mar 27, 2017 · 11 comments
Assignees
Labels
blocked has pr A PR has been created to address this issue
Milestone

Comments

@daniele-zurico
Copy link

daniele-zurico commented Mar 27, 2017

Hi all I've just update to angular4 but now it break when the application is render.
What I'm doing is using custom media query.
This is my code:

export const customBreakPoints: BreakPoint[ ] = [
    {
        alias: 'small',
        suffix: 'Xs',
        overlapping: false,
        mediaQuery: 'screen and (max-width: 319px)'
    },
    {
        alias: 'small',
        suffix: 'GtXs',
        overlapping: true,
        mediaQuery: 'screen and (max-width: 319px)'
    },
    {
        alias: 'mobile',
        suffix: 'Sm',
        overlapping: false,
        mediaQuery: 'screen and (min-width: 320px) and (max-width: 767px)'
    },
    {
        alias: 'mobile',
        suffix: 'GtSm',
        overlapping: true,
        mediaQuery: 'screen and (min-width: 320px) and (max-width: 767px)'
    },
    {
        alias: 'tablet',
        suffix: 'Md',
        overlapping: false,
        mediaQuery: 'screen and (min-width: 768px) and (max-width: 1023px)'
    },
    {
        alias: 'tablet',
        suffix: 'GtMd',
        overlapping: true,
        mediaQuery: 'screen and (min-width: 768px) and (max-width: 1023px)'
    },
    {
        alias: 'desktop',
        suffix: 'Lg',
        overlapping: false,
        mediaQuery: 'screen and (min-width: 1024px)'
    },
    {
        alias: 'desktop',
        suffix: 'GtLg',
        overlapping: true,
        mediaQuery: 'screen and (min-width: 1024px)'
    },
    {
        alias: 'desktop',
        suffix: 'Xl',
        overlapping: false,
        mediaQuery: 'screen and (min-width: 1024px)'
    }
];

@NgModule({
    bootstrap: [AppComponent],
    imports: [
        BrowserModule,
        HttpModule,
        FlexLayoutModule
    ],
    declarations: [
        AppComponent
    ],
    providers: [
...
        {provide : BREAKPOINTS, useValue: customBreakPoints}
    ]
})
export class AppModule {
    constructor() {

    }
}

I did something wrong or something happen with angular4?
thanks

@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Mar 27, 2017

Please refer to our Custom Breakpoints Documentation. Source examples can be seen here:

Note this feature will be available on npm with the next release. Before that you will need to access the nightly build with your local npm installs.

@ThomasBurleson ThomasBurleson added this to the v2.0.0-beta.7 milestone Mar 27, 2017
@ThomasBurleson
Copy link
Contributor

Closing as not an issue.

@daniele-zurico
Copy link
Author

Do we have any release schedule? I can't update just for that library. But angular4 should not be a smoothie upgrade?

@daniele-zurico
Copy link
Author

I think that this issue should remain open for the other people as well that they have the same problem

@ThomasBurleson
Copy link
Contributor

@angular/flex-layout works with Angular 4. Compiling with Angular 4 currently has some AOT-related errors. We will re-open until the Angular 4 AOT resolved.

@ThomasBurleson
Copy link
Contributor

ThomasBurleson commented Mar 27, 2017

@mmalerba - would you mind investigating this issue?

Refs #236.

@daniele-zurico
Copy link
Author

Hey guys I saw the new release! It does support AOT for angular4 or not yet?

@ThomasBurleson
Copy link
Contributor

You can use the @angular/flex-layout builds with Angular 4.
But currently you cannot compile @angular/flex-layout with ngc v4.x

@daniele-zurico
Copy link
Author

guys any news on that? I need to upgrade to angular4 but I'm stuck just for that library

crisbeto added a commit to crisbeto/flex-layout that referenced this issue Apr 12, 2017
* Bumps all of the `@angular` dependencies to 4 and Material to 2.0.0-beta.3.
* Fixes a few linter errors.
* Fixes an issue that prevented AoT from working under Angular 4.
* Moves away from a few of the APIs that were deprecated in Angular 4.
* Fixes issues with the testing setup which prevented the module from compiling with Angular 4.
* Fixes the demo app not working properly due to the Material theme not being included correctly.

Fixes angular#254, angular#236, angular#227.
crisbeto added a commit to crisbeto/flex-layout that referenced this issue Apr 12, 2017
* Bumps all of the `@angular` dependencies to 4 and Material to 2.0.0-beta.3.
* Fixes a few linter errors.
* Fixes an issue that prevented AoT from working under Angular 4.
* Moves away from a few of the APIs that were deprecated in Angular 4.
* Fixes issues with the testing setup which prevented the module from compiling with Angular 4.
* Fixes the demo app not working properly due to the Material theme not being included correctly.

Fixes angular#254, angular#236, angular#227.
kara pushed a commit that referenced this issue Apr 18, 2017
@ThomasBurleson
Copy link
Contributor

Angular 4 + AOT issue fixed with SHA fed87fa.

And now available in @angular/flex-layout Beta.8 on npm.

@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.
Labels
blocked has pr A PR has been created to address this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants