Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ng-if on ng-view #14002

Closed
Closed
@thomasmost

Description

@thomasmost

Not super concerning, as it seems to be VERY specific, but it seems that if you put an ng-if directive on an element CONTAINING your ng-view, in Angular 1.5 this now prevents ngRoute from properly routing the ng-view to your first template/controller.

My code:

<section class="main-area {{pageClass}}" ng-if="session" ng-class="{scheduleShowing: scheduleShowing, headerShowing: showPatientHeader}">
            <div ng-if="session && scheduleLoaded" ng-view></div>
</section>

What fixed it:

<section class="main-area {{pageClass}}" ng-hide="!session" ng-class="{scheduleShowing: scheduleShowing, headerShowing: showPatientHeader}">
            <div ng-if="session && scheduleLoaded" ng-view></div>
</section>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions