aol aol - 1 year ago 71
AngularJS Question

ngView disappears when navbar dropdown is clicked

I am trying to implement a page that contains a navbar ( see navbar), and the content of the page is inserted from a partial html via ngView. However when the dropdown is clicked, the entire ngView portion disappears.

This is how I defined the ngView:

<div ng-controller="MainCtrl">
<div ng-view></div>

Here is a plunker:
(Please open by clicking "Launch preview in separate window" to see the navbar)
Click the navbar button "Dropdown".

If I debug the screen I can see that the ngView is not rendered at all, all I see is this:

<!-- ngView: -->

Any ideas?

Answer Source

You should add this to the ul tag:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download