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.

ngView nested inside ngInclude #4957

Closed
Closed
@jeremyalan

Description

@jeremyalan

Problem:
I ran across an issue where the page wasn't being initialized properly when the ng-view tag was nested inside of an ng-include tag. This caused my ng-view to remain empty until the location was changed.

Plunker: http://plnkr.co/mj80TN0FXQH41grccSWN

Solution:
When linking the ng-view directive, the current route should be reloaded.

I was able to duplicate the issue and verify the resolution as a one-line change within the ngView directive by calling $route.reload(). As a temporary work-around, this call can also be made from a custom directive (as demonstrated in the Plunker example), or from the Controller monitoring the $scope.

I would love to hear your thoughts, and would be happy to submit a pull request with this change, if you prefer.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions