0

I am trying the demo for angular material tool bar. The default code for js is not having a any dependent modules. The code looks like below

angular.module('MyApp')

.controller('AppCtrl', function($scope) {

});

But if I add a new module or empty square braces like below, its not working

angular.module('MyApp',[])

.controller('AppCtrl', function($scope) {

});

If you remove it, its working. How can i add a module without affecting the material design ?

The link to plunker is here

1
  • Do you not need the dependencies in your [], such as [ngMaterial, ...]? Commented Aug 19, 2015 at 22:18

1 Answer 1

1

You need to add ngMaterial to your angular app like this:

angular.module('MyApp',['ngMaterial']);

Here is a working plunker

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.