0

Currently working on angular js and bootstrap here I am not using any jquery plugin for the responsive mobile design when i click the icon from the right side of my page. The menu was not showing expanding.

Here is the code i am using for Toggle navigation ng-init="navCollapsed = true" ng-click="navCollapsed = !navCollapsed"

I searched in SO and got this link I tried the same but still not working

Here is the Plunker link Kindly please guide me where I am doing wrong.

Community
  • 1
  • 1
Mr.M
  • 1,472
  • 3
  • 29
  • 76

1 Answers1

1

In your Plunker there are some problems in the code:

  • you defined the module as 'reak_app' while in the HTML ng-app refers to (a non existing) module named 'plunker'.
  • you defined a controller 'MainCtrl' but in the HTML ther is <body ng-controller="menu">.

Here is an updated (and working) Plunker

beaver
  • 17,333
  • 2
  • 40
  • 66
  • Hi @beaver could you please explain me what is ng-init="navCollapsed = true" ng-click="navCollapsed = !navCollapsed" i just copy paste this line but i am not getting this – Mr.M Jan 12 '16 at 13:49
  • The scope property `navCollapsed` is used as boolean toggle for the `collapse` directive of **Angular-ui-bootstrap** (see https://angular-ui.github.io/bootstrap/#/collapse) – beaver Jan 12 '16 at 14:05