Skip to content

Files

Latest commit

 

History

History
505 lines (297 loc) · 15.7 KB

CHANGELOG.md

File metadata and controls

505 lines (297 loc) · 15.7 KB

1.0.0-beta.1 (2016-05-19)

Bug Fixes

  • Guard: Guards correctly cancel the in-flight navigation(8cdc425)

Features

  • RouteTraverser: Allow forward slash in nested route paths (#108)(da70364)

1.0.0-beta.0 (2016-05-13)

Bug Fixes

  • deps: Specify semver range for Angular 2 release candidates(6b640c9)
  • Sourcemaps: Fix warnings from sourcemaps(e7dbc46), closes #97

Code Refactoring

Features

  • redirects: Support relative redirects for deeply nested config(3521b56)
  • RouteInstruction: Decouple Router from RouteInstruction (#99)(ede340d)

BREAKING CHANGES

  • You will now have to install @ngrx/core in addition to @ngrx/router

  • routes: indexRoute is now index and loadIndexRoute is now loadIndex

    BEFORE:

    const routes: Routes = [
      {
        path: '/',
        component: MarketingTemplateComponent,
        indexRoute: {
          component: HomePageComponent,
        }
      },
      {
        path: '/blog',
        component: BlogComponent,
        loadIndexRoute: () => System.import('app/routes/blog')
      }
    ];

    AFTER:

    const routes: Routes = [
      {
        path: '/',
        component: MarketingTemplateComponent,
        index: {
          component: HomePageComponent
        }
      },
      {
        path: '/blog',
        component: BlogComponent,
        loadIndex: () => System.import('app/routes/blog')
      }
    ];

0.4.0 (2016-05-03)

Bug Fixes

  • imports: Adjust imports for the new world(2d51638)

Code Refactoring

  • Guards: Re-implement guards feature to use services (#81)(145b671)
  • RouteTraverser: Expand traverser to also track query params and location changes (#85)(a373b92)

BREAKING CHANGES

  • RouteTraverser: TraversalCandidate interface has renamed params to routeParams and now includes queryParams and locationChange.

    Before:

    const { params, isTerminal, route } = traversalCandidate;

    After:

    const { routeParams, queryParams, isTerminal, route, locationChange } = traversalCandidate;
  • Guards: Before:

    const auth = provideGuard(function(http: Http) {
    
      return function(route: Route, params: any, isTerminal: boolean): Observable<boolean> {
        return http.get('/auth')
          .map(() => true)
          .catch(() => Observable.of(false));
      };
    
    }, [ Http ]);

    After:

    @Injectable()
    export class AuthGuard implements Guard {
      constructor(private http: Http) { }
    
      protectRoute({ route, params, isTerminal }: TraversalCandidate): Observable<boolean> {
        return this.http.get('/auth')
          .map(() => true)
          .catch(() => Observable.of(false));
      }
    }

0.3.0 (2016-04-26)

Bug Fixes

Code Refactoring

  • Guards: Improve guards API based on common usage (#62)(1ea2806)

Features

  • LinkActive: Added default class when link is active (#72)(e6a2920), closes #71
  • RouteInterface: Add options key to route interface used to store arbitrary metadata (#69)(900822e), closes #68

BREAKING CHANGES

  • Guards: Before:

    const auth = createGuard(function(http: Http) {
    
      return function(route: Route, params: any, isTerminal: boolean) {
        return http.get(...);
      };
    
    }, [ Http ]);

    After:

    const auth = provideGuard(function(http: Http) {
    
      return function(params: any, route: Route, isTerminal: boolean) {
        return http.get(...);
      };
    
    }, [ Http ]);

0.2.4 (2016-04-22)

Bug Fixes

  • linkTo: Remove trailing slashes from the linkTo path (#59)(c048a51)
  • RouterInstruction: Switched to async scheduler because zone.js (#61)(da6f725)
  • UndefinedRoutes: Route view correctly ignores undefined routes (#60)(1cdb67a)

0.2.2 (2016-04-14)

Bug Fixes

  • guards: Redirect in a guard on page load correctly causes location update(b99e6fa)

0.2.1 (2016-04-14)

0.2.0 (2016-04-14)

Code Refactoring

  • core: Updated core API for naming consistency (#53)(d879a90)
  • location: Renamed Location service to Router (#56)(5b14ef9)

Features

  • NamedComponents: Add ability to configure named components(df895cf), closes #6
  • patternMatching: Switch to path-to-regexp for pattern matching (#57)(4176112)

BREAKING CHANGES

  • location: Renamed Location service to Router and renamed replaceState method to replace

Before:

import { Location } from '@ngrx/router';

class App {
    constructor(location: Location) {
        location.replaceState('/path', { query: 1 });
    }
}

After:

import { Router } from '@ngrx/router';

class App {
    constructor(router: Router) {
        router.replace('/path', { query: 1 });
    }
}
  • core: Renamed NextRoute interface and RouteSet service to NextInstruction and RouterInstruction respectively.

    Before:

    import { NextRoute, RouteSet } from '@ngrx/router';

    After:

    import { NextInstruction, RouterInstruction } from '@ngrx/router';
  • core: Changed NextInstruction interface to include full LocationChange instead of just the path. Renamed routes to routeConfigs, params to routeParams, and query to queryParams

    Before:

    interface NextRoute {
      routes: Routes;
      query: any;
      params: any;
      url: string
    }

    After:

    interface NextInstruction {
      routeConfigs: Routes;
      queryParams: any;
      routeParams: any;
      locationChange: LocationChange;
    }

0.1.1 (2016-04-06)

Bug Fixes

  • Providers: Include ResourceLoader providers(a12fa6b)

Features

  • AsyncConfig: Refactor route config to use promises instead of callbacks(f057d55)
  • Params: Simplify params services by removing select method(af160d7)

BREAKING CHANGES

  • AsyncConfig: Before loadComponent, loadChildren, and loadIndexRoute used a callback to handle async loading

    of code. These must be replaced with promise-returning functions.

    Before:

    {
    
      loadIndex(done) {
    
        System.import('./my-index-route', __moduleName)
    
          .then(module => done(module.indexRoute));
    
      },
    
      loadComponent(done) {
    
        System.import('./my-component', __moduleName)
    
          .then(module => done(module.MyComponent));
    
      },
    
      loadChildren(done) {
    
        System.import('./child-routes', __moduleName)
    
          .then(module => done(module.routes));
    
      }
    
    }

    After:

    
    {
    
      loadIndex: () => System.import('./my-index-route', __moduleName)
    
        .then(module => module.indexRoute),
    
    
    
      loadComponent: () => System.import('./my-component', __moduleName)
    
        .then(module => module.MyComponent),
    
    
    
      loadChildren: () => System.import('./child-routes', __moduleName)
    
        .then(module => module.routes)
    
    }
    
    
  • Params: select method removed from QueryParams and RouteParams. Use pluck instead:

    BEFORE:

    routeParams.select('id').subscribe(id => {});

    AFTER:

    routeParams.pluck('id').subscribe(id => {});

0.0.7 (2016-04-04)

Bug Fixes

  • Loader: Use promises to wrap callbacks because zones :((ccb44b5)

0.0.6 (2016-04-04)

0.0.5 (2016-04-04)

Bug Fixes

  • Guards: Passing guards no longer remove terminal status(14d0d46)

0.0.4 (2016-04-04)

Bug Fixes

  • MatchRoute: Give favor to the order in which routes are defined(f37a394)

0.0.3 (2016-04-04)

Bug Fixes

  • Guard: Updated guard to use new traversal middleware API(a5bc802)
  • Guards: Schedule guard results to allow for guards to cancel traversal(4792acc)
  • LinkActive: Added linkActive directive to platform directives(63f3831)
  • LinkTo: Updated spec to use MockLocationStrategy(e6017cc)
  • MatchRoute: Correct spelling mistake on route traversal error(984fbf2)
  • MatchRoute: Don't import unnecessary every operator(3222169)
  • MatchRoute: Export TraversalCandidate as part of public API(0ecf695)

Features

  • directives: Added linkActive directive(7750329)
  • MatchRoute: Moved traversal middleware opportunity to after a route is matched(5144caa)

0.0.2 (2016-04-01)

0.0.1 (2016-04-01)

Bug Fixes

  • build: Copy LICENSE to release(582c43f)
  • Gaurds: Handle empty guard arrays(68100a2)
  • Guards: Use merge/every instead of forkJoin(c899754)
  • Guide: Fix formatting on guide index(0ad086b)
  • Location: Cleaned up Location service(1d0ab8a)
  • MatchRoute: updated RouteTraverser to inject routes(09feccc)
  • MatchRoute: Updated unit tests to match new API(687eda8)
  • sourcemaps: Render the sourcemaps inline so they can be published easily(6ff5a95)
  • test: Added sourcemaps to karma(9f11ea5)
  • testing: Updated webpack config for tests(00efe4c)
  • tests: Include tests in tsconfig.json(29aaf26)

Features

  • build: Added initial build setup(1ef9199), closes #1
  • ComponentRenderer: Added unit tests for component renderer service(10c31cc)
  • ComponentRenderer: Split render middleware into pre/post render middleware(59b7ad9)
  • directives: Added linkTo directive(7703ba2)
  • Guards: Added unit tests for guard middleware(0364168)
  • LinkTo: Added unit tests for LinkTo directive(529879f)
  • Location: Added unit tests for location service(09ba1e6)
  • Location: Updated location to be a ReplaySubject instead of BehaviorSubject(41dc49b)
  • Middleware: Added small test for middleware helpers(0689555)
  • QueryParams: Added new QueryParams service(075845b)
  • Redirect: Added tests for redirection middleware(0c526ee)
  • RouteParams: Added unit tests for RouteParams service(4074a40)
  • RouteSet: Added unit tests for route set(f7421bc)
  • RouteSet: Refactored route set to expose query params(0f9c40d)
  • RouteView: Added unit tests for route view(09700ee)
  • test: Added initial setup for testing(aba3689), closes #2
  • Util: Added unit tests for utilities(58b627c)