Sports-Fixture-Software / sports-fixture-software

1 stars 0 forks source link

Update to latest Angular release #33

Closed michahump closed 8 years ago

michahump commented 8 years ago

Angular2 RC5 has been released. This brings significant improvements to the router (which will be required to implement the breadcrumb navigation), however changes to the app structure will be required to ensure all services can be injected properly.

See #30 and https://angular.io/docs/ts/latest/cookbook/rc4-to-rc5.html

cskeogh commented 8 years ago

May I suggest update the typings too. This occurs on npm install:

typings WARN deprecated 7/26/2016: "registry:dt/core-js#0.0.0+20160602141332" is deprecated (updated, replaced or removed)
typings WARN deprecated 8/11/2016: "registry:dt/bluebird#2.0.0+20160701023356" is deprecated (updated, replaced or removed)
typings WARN deprecated 8/11/2016: "registry:dt/bookshelf#0.8.2+20160514174357" is deprecated (updated, replaced or removed)
typings WARN deprecated 8/15/2016: "registry:dt/knex#0.0.0+20160812170915" is deprecated (updated, replaced or removed)
typings WARN deprecated 8/23/2016: "registry:dt/node#6.0.0+20160805072842" is deprecated (updated, replaced or removed)
cskeogh commented 8 years ago

May I suggest in this issue to tidy up parent routing. I think RC5 changes both methods anyways. I've used:

this._router.routerState.parent(this._route).params.forEach(params => {
    let id = +params['id'];

@michahump has used:

this.routeSubscription = this.parent.route.params.subscribe(params => {
    let id = +params['id'];
cskeogh commented 8 years ago

With an app component (as required in RC5), we can format dates according to the user's preferred date format (as set in Windows settings). Something like

import * as electron from 'electron'

let locale = electron.app.getLocale()
let formatter = Intl.DateTimeFormat(locale)
formatter.format(new Date())
cskeogh commented 8 years ago

Angular RC5 has changed FormControl. The method updateValue has been replaced with setValue. #24 uses updateValue.

https://angular.io/docs/ts/latest/api/forms/index/FormControl-class.html

cskeogh commented 8 years ago

Look at fixing the following:

WARN: `electron-prebuilt` has been deprecated as of `electron-prebuilt@1.3.1`. Please move to `electron` instead