Material2 and Angular (4)

3,352 views
Skip to first unread message

3Pi

unread,
Mar 15, 2017, 5:30:57 AM3/15/17
to angular-material2
For some weeks, Material2 development seems to be quite quiet and the roadmap is evasive.
Is that bound to Angular 4 version is coming ?

Will Material2 development quickly be synchronized with Angular 4 ?

Some major features are still missing in Material2 but I would really prefer not to use another libraries for core features.
Some dates/deadlines in the roadmap could help to know how to deal with missing features...

Thanks to all the people working on these projects (and sorry not to get enough time to be involved myself= !

Andrew Seguin

unread,
Mar 15, 2017, 6:35:22 PM3/15/17
to 3Pi, angular-material2
You can find the current roadmap on the README: https://github.com/angular/material2/blob/master/README.md. I'm not sure what is evasive or quiet, the repo has many commits merged every day.

Material2 is already compatible with Angular 4. If you find any issues, please feel free to open an issue and we will certainly prioritize it. 

--
You received this message because you are subscribed to the Google Groups "angular-material2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular-materi...@googlegroups.com.
To post to this group, send email to angular-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular-material2/d12f963d-0f84-4a17-b07b-96f2b0a6719b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

3Pi

unread,
Mar 16, 2017, 10:30:38 AM3/16/17
to angular-material2
If I switch to 4.0.0-rc.3, I got loads of warning such as :

Template parse warnings: The <template> element is deprecated. Use <ng-template> instead ("[ERROR ->]<template><div class="mat-menu-panel" [ngClass]="_classList" (keydown)="_keyManager.onKeydown($event)"): MdMenu@0:0

Then my app crashes with :
EXCEPTION: Found the synthetic listener @translateTab.start. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.

and my Tabs are empy...

Maybe I am missing something, but it seems like Material2 and Angular 4 are not compatible at the moment...

Regarding the roadmap, it is said "High level items planned for next few months:"
Not sure what to expect, and when... (README.md is 23 days old, and CHANGELOG.md 29 days)

That's the reason why I asked these questions...

Andrew Seguin

unread,
Mar 16, 2017, 12:56:48 PM3/16/17
to 3Pi, angular-material2
Your tabs issue appears to be due to your app missing the animations package, which is no longer part of core.

"We have pulled Animations into their own package. This means that if you don’t use Animations, this extra code will not end up in your production bundles. This also allows you to more easily find documentation and to take better advantage of autocompletion. If you do need animations, libraries like Material will automatically import the module (once you install it via NPM), or you can add it yourself to your main 

To include it:
1. Add animations to your package.json: "@angular/animations": "^4.0.0-rc.3",
2. Include it into your main app module's imports:
     import {BrowserAnimationsModule} from '@angular/platform-browser/animations'
     ...
     @NgModule({
       imports: [
         ...
         BrowserAnimationsModule,
         ...
       ],
     })


The template warnings will persist until we move to use ng-template, which should not be done until version 4 is released. They should not cause problems.

--
You received this message because you are subscribed to the Google Groups "angular-material2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular-materi...@googlegroups.com.
To post to this group, send email to angular-...@googlegroups.com.

3Pi

unread,
Mar 16, 2017, 2:02:02 PM3/16/17
to angular-material2
Thanks a lot, Andrew.
Angular 4 is now OK in my app ;-)

Dakshina Udayanga

unread,
Mar 27, 2017, 9:15:48 AM3/27/17
to angular-material2
hi guys,

im having the same issue and tried your solution. when i do  

import {BrowserAnimationsModule} from '@angular/platform-browser/animations';

it throws an error saying  


any idea what might be causing this ?

thanks :)

3Pi

unread,
Mar 28, 2017, 10:57:14 AM3/28/17
to angular-material2
You should have a look in your js loader (systemjs.config.js ?).

The correct path must be : '@angular/platform-browser/bundles/platform-browser-animations.umd.js'

You may, for example, twist your config mapping with something like :
config.map['@angular/'+pkgName] = 'npm:@angular/' + ((pkgName.indexOf('/') >=0) ? pkgName.substr(0,pkgName.indexOf('/')) : pkgName) + '/bundles/' + pkgName.replace('/','-') + '.umd.js';

Dakshina Udayanga

unread,
Mar 29, 2017, 2:36:46 AM3/29/17
to 3Pi, angular-material2
exactly that was the issue. thank you 3Pi  :D

--
You received this message because you are subscribed to a topic in the Google Groups "angular-material2" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular-material2/OZfHPdLG_U8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular-material2+unsubscribe@googlegroups.com.
To post to this group, send email to angular-material2@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular-material2/ec77ef3c-547d-4bdf-bc7e-849026813ffa%40googlegroups.com.
Message has been deleted

James Campbell

unread,
Mar 31, 2017, 11:11:25 PM3/31/17
to Rahul Sachdeva, angular-material2
Re: the animations requirement: which of the material components require the animations package (and does its omission cause an error or simply loss of normal animations?)

On Fri, Mar 31, 2017 at 2:50 AM Rahul Sachdeva <sachdeva...@gmail.com> wrote:
i'm trying to use material with angular unviversal with angular 2 and 4 but it doesn't work . is this a compatibility issue??

For more options, visit https://groups.google.com/d/optout.
--

d@sp

unread,
Apr 4, 2017, 7:05:04 AM4/4/17
to angular-material2
Hi,

I still have the error :

ZoneAwareError {__zone_symbol__error: Error: (SystemJS) Unexpected value 'undefined' imported by the module 'AppModule'

Thank you for your help ; I think we're close to the solution !
Reply all
Reply to author
Forward
0 new messages