Any Material Design libraries for Angular 2.0 applications?

1,469 views
Skip to first unread message

Raul Rodriguez

unread,
Jan 3, 2016, 9:14:45 AM1/3/16
to AngularJS
I am looking for a material design library to be used with Angular 2.0. 

Material Design Lite (MDL) was quite easy to setup, but I get some problems when I try to create components as I would like to design them.

For example I would like my main index.html to look something like this (just the body tags):

<body>
     <app>Loading...</app>
</body>

The component with the "app" selector has a template that looks something like this:

<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
    <header class="mdl-layout__header">
        <div class="mdl-layout__header-row">
            <div class="mdl-layout-icon"><img id="Logo" src="images/Logo.png"></div>        
            <span class="mdl-layout-title">My Custom App</span>
        </div>
    </header>

    <div class="mdl-layout__drawer">
         <span class="mdl-layout-title">Drawer</span>
    </div>

    <main class="mdl-layout__content">    
         <router-outlet></router-outlet>
    </main>    
</div>

If I use it like this everything looks ok. The routing works as expected but for example the button for the drawer on the title bar disappears! I suppose it has something to do with the way MDL wants to be initialized or how their Javascript code accesses the DOM.


Angular Material ( https://material.angularjs.org ) seems to work just with Angular 1.x, but not with Angular 2.0.

What is the "official" material design library for Angular 2?

Günter Zöchbauer

unread,
Jan 3, 2016, 10:45:20 AM1/3/16
to AngularJS

Raul

unread,
Jan 3, 2016, 10:59:12 AM1/3/16
to AngularJS
Thank you Günter!

As it seems it will take quite a lot of time to have a working alternative :-(

It is strange as for many people Angular 2 can only be used if you can provide the material look and feel.

Günter Zöchbauer

unread,
Jan 3, 2016, 11:03:46 AM1/3/16
to AngularJS
It is how it is. Material components can't be built for Angular2 before Angular2 is ready. It just became useable recently.
Work is in progress already, but as we know, complex software projects usually aren't completed within a few days.
Reply all
Reply to author
Forward
0 new messages