parent
725bae1921
commit
15cc85c54a
|
@ -28,13 +28,13 @@ export interface HttpParameterCodec {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export class HttpUrlEncodingCodec implements HttpParameterCodec {
|
export class HttpUrlEncodingCodec implements HttpParameterCodec {
|
||||||
encodeKey(k: string): string { return standardEncoding(k); }
|
encodeKey(key: string): string { return standardEncoding(key); }
|
||||||
|
|
||||||
encodeValue(v: string): string { return standardEncoding(v); }
|
encodeValue(value: string): string { return standardEncoding(value); }
|
||||||
|
|
||||||
decodeKey(k: string): string { return decodeURIComponent(k); }
|
decodeKey(key: string): string { return decodeURIComponent(key); }
|
||||||
|
|
||||||
decodeValue(v: string) { return decodeURIComponent(v); }
|
decodeValue(value: string) { return decodeURIComponent(value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -51,22 +51,22 @@ export class NgClass implements DoCheck {
|
||||||
private _ngEl: ElementRef, private _renderer: Renderer2) {}
|
private _ngEl: ElementRef, private _renderer: Renderer2) {}
|
||||||
|
|
||||||
@Input('class')
|
@Input('class')
|
||||||
set klass(v: string) {
|
set klass(value: string) {
|
||||||
this._removeClasses(this._initialClasses);
|
this._removeClasses(this._initialClasses);
|
||||||
this._initialClasses = typeof v === 'string' ? v.split(/\s+/) : [];
|
this._initialClasses = typeof value === 'string' ? value.split(/\s+/) : [];
|
||||||
this._applyClasses(this._initialClasses);
|
this._applyClasses(this._initialClasses);
|
||||||
this._applyClasses(this._rawClass);
|
this._applyClasses(this._rawClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
set ngClass(v: string|string[]|Set<string>|{[klass: string]: any}) {
|
set ngClass(value: string|string[]|Set<string>|{[klass: string]: any}) {
|
||||||
this._removeClasses(this._rawClass);
|
this._removeClasses(this._rawClass);
|
||||||
this._applyClasses(this._initialClasses);
|
this._applyClasses(this._initialClasses);
|
||||||
|
|
||||||
this._iterableDiffer = null;
|
this._iterableDiffer = null;
|
||||||
this._keyValueDiffer = null;
|
this._keyValueDiffer = null;
|
||||||
|
|
||||||
this._rawClass = typeof v === 'string' ? v.split(/\s+/) : v;
|
this._rawClass = typeof value === 'string' ? value.split(/\s+/) : value;
|
||||||
|
|
||||||
if (this._rawClass) {
|
if (this._rawClass) {
|
||||||
if (isListLikeIterable(this._rawClass)) {
|
if (isListLikeIterable(this._rawClass)) {
|
||||||
|
|
|
@ -41,10 +41,10 @@ export class NgStyle implements DoCheck {
|
||||||
private _differs: KeyValueDiffers, private _ngEl: ElementRef, private _renderer: Renderer2) {}
|
private _differs: KeyValueDiffers, private _ngEl: ElementRef, private _renderer: Renderer2) {}
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
set ngStyle(v: {[key: string]: string}) {
|
set ngStyle(values: {[key: string]: string}) {
|
||||||
this._ngStyle = v;
|
this._ngStyle = values;
|
||||||
if (!this._differ && v) {
|
if (!this._differ && values) {
|
||||||
this._differ = this._differs.find(v).create();
|
this._differ = this._differs.find(values).create();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,4 +67,4 @@ export interface LocationChangeEvent {
|
||||||
/**
|
/**
|
||||||
* @experimental
|
* @experimental
|
||||||
*/
|
*/
|
||||||
export interface LocationChangeListener { (e: LocationChangeEvent): any; }
|
export interface LocationChangeListener { (event: LocationChangeEvent): any; }
|
||||||
|
|
|
@ -219,7 +219,7 @@ export interface LocationChangeEvent {
|
||||||
|
|
||||||
/** @experimental */
|
/** @experimental */
|
||||||
export interface LocationChangeListener {
|
export interface LocationChangeListener {
|
||||||
(e: LocationChangeEvent): any;
|
(event: LocationChangeEvent): any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare abstract class LocationStrategy {
|
export declare abstract class LocationStrategy {
|
||||||
|
|
|
@ -1695,10 +1695,10 @@ export interface HttpSentEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
export declare class HttpUrlEncodingCodec implements HttpParameterCodec {
|
export declare class HttpUrlEncodingCodec implements HttpParameterCodec {
|
||||||
decodeKey(k: string): string;
|
decodeKey(key: string): string;
|
||||||
decodeValue(v: string): string;
|
decodeValue(value: string): string;
|
||||||
encodeKey(k: string): string;
|
encodeKey(key: string): string;
|
||||||
encodeValue(v: string): string;
|
encodeValue(value: string): string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HttpUserEvent<T> {
|
export interface HttpUserEvent<T> {
|
||||||
|
|
Loading…
Reference in New Issue