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-view duplication in the 1.4.RC #11867

Closed
@havenchyk

Description

@havenchyk

Hi there,

I've upgraded my application to the 1.4-RC2 and found that after changing of the route e.g. from 'route1' to 'route2' there is several dom elements with ng-view attribute.
Issue is reproducible in my application with versions RC0, RC1 and RC2 and only on the route that will be handled in otherwise. E.g. '/Book'

Image of bug

I haven't able to reproduce this issue on jsbin, but it exists in my application.
http://jsbin.com/buzuwe/2/edit?html,js,output

Simplified version of my config looks like this:

app.config(function($routeProvider, $compileProvider) {
  $routeProvider
   .when('/Book/:bookId', {
    templateUrl: 'book.html',
    controller: 'BookController',
    resolve: {
      delay: function($q, $timeout) {
        var delay = $q.defer();
        $timeout(delay.resolve, 1000);
        return delay.promise;
      }
    }
  })
  .when('/Book/:bookId/ch/:chapterId', {
    templateUrl: 'chapter.html',
    controller: 'ChapterController'
  })
  .otherwise({
    redirectTo: '/',
    templateUrl: 'noRoute.html'
  });

$compileProvider.aHrefSanitizationWhitelist(...);

Could anyone help to find, what's the problem here? Is it a bug or just wrong structure of my application?

Thanks in advance

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions