Search code examples
cssangularjsyeomanmaterialize

How to add materialize css to an angularjs project?


I'm using Yeoman to develop a new site with angularJS. I've tried with bower install materialize and bower install angular-material but nothing happens, I mean, it doesn't change the appearance and functionality. I've add also to the index.html these two lines:

<script src="bower_components/angular-aria/angular-aria.js"></script <script src="bower_components/angular-material/angular-material.js"></script>

I guess I may change the css route for the style, but not sure how...


Solution

  • Add the line below to your head to load the css

    <link rel="stylesheet" href="/bower_components/angular-material/angular-material.css">
    

    The full skeleton is available at

    https://github.com/angular/bower-material/blob/master/README.md

    By the way, your bower install and script src both refer to https://material.angularjs.org/latest and not http://materializecss.com/, which is in the title and tags. materializecss is a separate project that provides similar components. You probably don't need both.