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.

1 Answer 1

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

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

2 Comments

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
The scope property navCollapsed is used as boolean toggle for the collapse directive of Angular-ui-bootstrap (see angular-ui.github.io/bootstrap/#/collapse)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.