Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 7b528d5

Browse files
committed
feat: angular 4 compatibility
* Updates all Angular dependencies to the latest RC. * Fixes any errors/warnings cause by the upgrade. * Fixes error when running the unit tests. * Bumps the year in the license.
1 parent e704d54 commit 7b528d5

File tree

8 files changed

+27
-26
lines changed

8 files changed

+27
-26
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2016 Google, Inc.
3+
Copyright (c) 2017 Google, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

karma.conf.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ const path = require('path');
66
module.exports = function (config) {
77
config.set({
88
basePath: '',
9-
frameworks: ['jasmine', 'angular-cli'],
9+
frameworks: ['jasmine', '@angular/cli'],
1010
plugins: [
1111
require('karma-jasmine'),
1212
require('karma-chrome-launcher'),
1313
require('karma-remap-istanbul'),
14-
require('angular-cli/plugins/karma'),
14+
require('@angular/cli/plugins/karma'),
1515
require('karma-browserstack-launcher'),
1616
require('karma-sauce-launcher'),
1717
],
1818
files: [
1919
{ pattern: './src/test.ts', watched: false }
2020
],
2121
preprocessors: {
22-
'./src/test.ts': ['angular-cli']
22+
'./src/test.ts': ['@angular/cli']
2323
},
2424
mime: {
2525
'text/x-typescript': ['ts','tsx']
@@ -66,7 +66,7 @@ module.exports = function (config) {
6666
pollingTimeout: 20000
6767
},
6868
});
69-
69+
7070
if (process.env['TRAVIS']) {
7171

7272
let buildId = `TRAVIS #${process.env.TRAVIS_BUILD_NUMBER} (${process.env.TRAVIS_BUILD_ID})`;
@@ -87,5 +87,5 @@ module.exports = function (config) {
8787
}
8888

8989
config.browsers = platformMap[platformType];
90-
}
90+
}
9191
};

package.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "angular-io-v42",
2+
"name": "material-angular-io-v42",
33
"version": "0.0.0",
44
"license": "MIT",
55
"angular-cli": {},
@@ -16,22 +16,23 @@
1616
},
1717
"private": true,
1818
"dependencies": {
19-
"@angular/common": "^2.4.6",
20-
"@angular/compiler": "^2.4.6",
21-
"@angular/core": "^2.4.6",
22-
"@angular/forms": "^2.4.6",
23-
"@angular/http": "^2.4.6",
24-
"@angular/material": "^2.0.0-beta.1",
25-
"@angular/platform-browser": "^2.4.6",
26-
"@angular/platform-browser-dynamic": "^2.4.6",
27-
"@angular/router": "~3.4.6",
19+
"@angular/animations": "^4.0.0-rc.5",
20+
"@angular/common": "^4.0.0-rc.5",
21+
"@angular/compiler": "^4.0.0-rc.5",
22+
"@angular/core": "^4.0.0-rc.5",
23+
"@angular/forms": "^4.0.0-rc.5",
24+
"@angular/http": "^4.0.0-rc.5",
25+
"@angular/material": "^2.0.0-beta.3",
26+
"@angular/platform-browser": "^4.0.0-rc.5",
27+
"@angular/platform-browser-dynamic": "^4.0.0-rc.5",
28+
"@angular/router": "^4.0.0-rc.5",
2829
"core-js": "^2.4.1",
2930
"rxjs": "^5.1.0",
30-
"zone.js": "^0.7.6"
31+
"zone.js": "^0.8.4"
3132
},
3233
"devDependencies": {
3334
"@angular/cli": "^1.0.0-beta.30",
34-
"@angular/compiler-cli": "^2.4.6",
35+
"@angular/compiler-cli": "^4.0.0-rc.5",
3536
"@types/jasmine": "^2.5.41",
3637
"@types/node": "^7.0.5",
3738
"highlight.js": "^9.9.0",
@@ -46,6 +47,6 @@
4647
"protractor": "^5.1.1",
4748
"ts-node": "^2.0.0",
4849
"tslint": "^4.4.2",
49-
"typescript": "~2.0.10"
50+
"typescript": "~2.1.6"
5051
}
5152
}

src/app/material-docs-app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export class MaterialDocsApp {
1616
showShadow = false;
1717

1818
constructor(router: Router) {
19-
router.events.subscribe(data => {
20-
this.showShadow = data.url.startsWith('/components');
19+
router.events.subscribe(() => {
20+
this.showShadow = router.url.startsWith('/components');
2121
});
2222
}
2323
}

src/app/shared/example-viewer/example-viewer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
</div>
2727

2828
<div class="docs-example-viewer-body">
29-
<template [portalHost]="selectedPortal"></template>
29+
<ng-template [portalHost]="selectedPortal"></ng-template>
3030
</div>
3131
</div>

src/app/shared/footer/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</div>
1414

1515
<div class="docs-footer-copyright">
16-
<p>Powered by Google ©2010-2016. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.</p>
16+
<p>Powered by Google ©2010-2017. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.</p>
1717
</div>
1818
</div>
1919
</footer>

src/app/shared/plunker/plunker-writer.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ describe('PlunkerWriter', () => {
4545
it('should append correct copyright', () => {
4646
expect(plunkerWriter._appendCopyright('test.ts', 'NoContent')).toBe(`NoContent
4747
48-
/** Copyright 2016 Google Inc. All Rights Reserved.
48+
/** Copyright 2017 Google Inc. All Rights Reserved.
4949
Use of this source code is governed by an MIT-style license that
5050
can be found in the LICENSE file at http://angular.io/license */`);
5151

5252
expect(plunkerWriter._appendCopyright('test.html', 'NoContent')).toBe(`NoContent
5353
54-
<!-- Copyright 2016 Google Inc. All Rights Reserved.
54+
<!-- Copyright 2017 Google Inc. All Rights Reserved.
5555
Use of this source code is governed by an MIT-style license that
5656
can be found in the LICENSE file at http://angular.io/license -->`);
5757

src/app/shared/plunker/plunker-writer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'rxjs/add/operator/toPromise';
66
const PLUNKER_URL = 'https://plnkr.co/edit/?p=preview';
77

88
const COPYRIGHT =
9-
`Copyright 2016 Google Inc. All Rights Reserved.
9+
`Copyright 2017 Google Inc. All Rights Reserved.
1010
Use of this source code is governed by an MIT-style license that
1111
can be found in the LICENSE file at http://angular.io/license`;
1212

0 commit comments

Comments
 (0)