Skip to content

Commit 9b24d11

Browse files
committed
fix: various AoT and prerender issues
1 parent 52a8762 commit 9b24d11

File tree

8 files changed

+14
-24
lines changed

8 files changed

+14
-24
lines changed

src/lib/datepicker/datepicker-toggle.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<button md-icon-button type="button" [attr.aria-label]="_intl.openCalendarLabel"
22
[disabled]="disabled" (click)="_open($event)">
33
<md-icon>
4-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="100%" height="100%"
5-
fill="currentColor" style="vertical-align: top" focusable="false">
4+
<svg viewBox="0 0 24 24" width="100%" height="100%" fill="currentColor"
5+
style="vertical-align: top" focusable="false">
66
<path d="M0 0h24v24H0z" fill="none"/>
77
<path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"/>
88
</svg>

src/lib/expansion/expansion-panel-header.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
animate,
2727
} from '@angular/animations';
2828
import {SPACE, ENTER} from '../core/keyboard/keycodes';
29-
import {MdExpansionPanel, EXPANSION_PANEL_ANIMATION_TIMING} from './expansion-panel';
29+
import {MdExpansionPanel} from './expansion-panel';
3030
import {filter} from '../core/rxjs/index';
3131
import {FocusOriginMonitor} from '../core/style/index';
3232
import {merge} from 'rxjs/observable/merge';
@@ -69,7 +69,7 @@ import {Subscription} from 'rxjs/Subscription';
6969
trigger('indicatorRotate', [
7070
state('collapsed', style({transform: 'rotate(0deg)'})),
7171
state('expanded', style({transform: 'rotate(180deg)'})),
72-
transition('expanded <=> collapsed', animate(EXPANSION_PANEL_ANIMATION_TIMING)),
72+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4,0.0,0.2,1)')),
7373
]),
7474
trigger('expansionHeight', [
7575
state('collapsed', style({
@@ -82,7 +82,7 @@ import {Subscription} from 'rxjs/Subscription';
8282
}), {
8383
params: {expandedHeight: '64px'}
8484
}),
85-
transition('expanded <=> collapsed', animate(EXPANSION_PANEL_ANIMATION_TIMING)),
85+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4,0.0,0.2,1)')),
8686
]),
8787
],
8888
})

src/lib/expansion/expansion-panel.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ import {Subject} from 'rxjs/Subject';
3636
/** MdExpansionPanel's states. */
3737
export type MdExpansionPanelState = 'expanded' | 'collapsed';
3838

39-
/** Time and timing curve for expansion panel animations. */
40-
export const EXPANSION_PANEL_ANIMATION_TIMING = '225ms cubic-bezier(0.4,0.0,0.2,1)';
41-
4239
/**
4340
* <md-expansion-panel> component.
4441
*
@@ -67,7 +64,7 @@ export const EXPANSION_PANEL_ANIMATION_TIMING = '225ms cubic-bezier(0.4,0.0,0.2,
6764
trigger('bodyExpansion', [
6865
state('collapsed', style({height: '0px', visibility: 'hidden'})),
6966
state('expanded', style({height: '*', visibility: 'visible'})),
70-
transition('expanded <=> collapsed', animate(EXPANSION_PANEL_ANIMATION_TIMING)),
67+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4,0.0,0.2,1)')),
7168
]),
7269
],
7370
})

src/lib/snack-bar/snack-bar-container.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ import {MdSnackBarConfig} from './snack-bar-config';
4040

4141
export type SnackBarState = 'initial' | 'visible' | 'complete' | 'void';
4242

43-
// TODO(jelbourn): we can't use constants from animation.ts here because you can't use
44-
// a text interpolation in anything that is analyzed statically with ngc (for AoT compile).
45-
export const SHOW_ANIMATION = '225ms cubic-bezier(0.4,0.0,1,1)';
46-
export const HIDE_ANIMATION = '195ms cubic-bezier(0.0,0.0,0.2,1)';
47-
4843
/**
4944
* Internal component that wraps user-provided snack bar content.
5045
* @docs-private
@@ -66,8 +61,8 @@ export const HIDE_ANIMATION = '195ms cubic-bezier(0.0,0.0,0.2,1)';
6661
trigger('state', [
6762
state('void, initial, complete', style({transform: 'translateY(100%)'})),
6863
state('visible', style({transform: 'translateY(0%)'})),
69-
transition('visible => complete', animate(HIDE_ANIMATION)),
70-
transition('initial => visible, void => visible', animate(SHOW_ANIMATION)),
64+
transition('visible => complete', animate('195ms cubic-bezier(0.0,0.0,0.2,1)')),
65+
transition('initial => visible, void => visible', animate('225ms cubic-bezier(0.4,0.0,1,1)')),
7166
])
7267
],
7368
})

src/material-examples/example-module.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,6 @@ export const EXAMPLE_COMPONENTS = {
462462
additionalFiles: null,
463463
selectorName: null
464464
},
465-
{
466-
'table-basic': {
467-
title: 'Basic table',
468-
component: TableBasicExample,
469-
},
470465
'stepper-overview': {
471466
title: 'Stepper overview',
472467
component: StepperOverviewExample,

src/material-examples/tabs-template-label/tabs-template-label-example.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
.demo-tab-content {
66
padding: 16px;
7-
}
7+
}

src/universal-app/prerender.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import {renderModuleFactory} from '@angular/platform-server';
66
import {join} from 'path';
77
import {readFileSync} from 'fs-extra';
88
import {log} from 'gulp-util';
9-
import {KitchenSinkServerModuleNgFactory} from './kitchen-sink/kitchen-sink.ngfactory';
9+
import {
10+
KitchenSinkServerModuleNgFactory
11+
} from './dist/packages/universal-app/kitchen-sink/kitchen-sink.ngfactory';
1012

1113
enableProdMode();
1214

src/universal-app/tsconfig-build.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"declaration": true,
66
"stripInternal": false,
77
"experimentalDecorators": true,
8-
"noUnusedParameters": true,
8+
// TODO(crisbeto): disabled due to https://github.com/angular/angular/issues/17131
9+
"noUnusedParameters": false,
910
"strictNullChecks": true,
1011
"module": "commonjs",
1112
"moduleResolution": "node",

0 commit comments

Comments
 (0)