fix(router): routerLinkActive should only set classes after the router has successfully navigated

This commit is contained in:
vsavkin
2016-07-20 17:51:21 -07:00
parent eb6ff65af7
commit db54a84d14
10 changed files with 69 additions and 4 deletions

View File

@ -7,8 +7,7 @@
*/
import {Location, LocationStrategy} from '@angular/common';
import {SpyLocation} from '@angular/common/testing';
import {MockLocationStrategy} from '@angular/common/testing/mock_location_strategy';
import {MockLocationStrategy, SpyLocation} from '@angular/common/testing';
import {AppModule, AppModuleFactory, AppModuleFactoryLoader, Compiler, ComponentResolver, Injectable, Injector} from '@angular/core';
import {Router, RouterOutletMap, Routes, UrlSerializer} from '../index';
@ -16,6 +15,7 @@ import {ROUTES} from '../src/router_config_loader';
import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from '../src/router_module';
/**
* A spy for {@link AppModuleFactoryLoader} that allows tests to simulate the loading of app module
* factories.