Error while adding dependency for angular-materialize

I want to use materialize for my angular project from https://github.com/krescruz/angular-materialize but I get the error

angular.js:68 Uncaught Error: [$injector:modulerr] Failed to instantiate module F1FeederApp due to: Error: [$injector:modulerr] Failed to instantiate module ui.materialize due to: Error: [$injector:nomod] Module 'ui.materialize' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

In my app.js:

angular.module('F1FeederApp', [
        'ui.materialize',
        'F1FeederApp.services',
        'F1FeederApp.controllers',
        'ngRoute'
        ]).

What am I doing wrong? According to the link above these declarations should have been enough..

Upvotes: 1

Views: 655

Answers (1)

M. Junaid Salaat
M. Junaid Salaat

Reputation: 3783

Try running this in root of your project if you are using bower.

bower install angular-materialize --save

and add the source file angular-materialize/src/angular-materialize.js into your index.html

OR

If you are not using bower or node download this file in your project and add it in your index.html

Hope this helps

Upvotes: 2

Related Questions