本文整理汇总了TypeScript中angular2/src/facade/lang.normalizeBlank函数的典型用法代码示例。如果您正苦于以下问题:TypeScript normalizeBlank函数的具体用法?TypeScript normalizeBlank怎么用?TypeScript normalizeBlank使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了normalizeBlank函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: initCallbacks
initCallbacks({onTurnStart,
onTurnDone,
onScheduleMicrotask,
onErrorHandler} = {}) {
this._onTurnStart = normalizeBlank(onTurnStart);
this._onTurnDone = normalizeBlank(onTurnDone);
this._onErrorHandler = normalizeBlank(onErrorHandler);
}
示例2: generate
generate(params: StringMap<string, string>): string {
if (!StringMapWrapper.contains(params, this.name)) {
throw new BaseException(
`Route generator for '${this.name}' was not included in parameters passed.`)
}
return normalizeBlank(StringMapWrapper.get(params, this.name));
}
示例3: value
set value(value) {
this._emptyAllActiveViewContainers();
this._useDefault = false;
var containers = MapWrapper.get(this._valueViewContainers, value);
if (isBlank(containers)) {
this._useDefault = true;
containers = normalizeBlank(MapWrapper.get(this._valueViewContainers, _whenDefault));
}
this._activateViewContainers(containers);
this._switchValue = value;
}
示例4: _onError
_onError(zone, e) {
if (isPresent(this._onErrorHandler)) {
var trace = [normalizeBlank(e.stack)];
while (zone && zone.constructedAtException) {
trace.push(zone.constructedAtException.get());
zone = zone.parent;
}
this._onErrorHandler(e, trace);
} else {
throw e;
}
}
示例5: _processRequest
_processRequest(request) {
var url = request.url;
if (this._expectations.length > 0) {
var expectation = this._expectations[0];
if (expectation.url == url) {
ListWrapper.remove(this._expectations, expectation);
request.complete(expectation.response);
return ;
}
}
if (MapWrapper.contains(this._definitions, url)) {
var response = MapWrapper.get(this._definitions, url);
request.complete(normalizeBlank(response));
return ;
}
throw new BaseException(`Unexpected request ${url}`);
}
示例6: getAttribute
/**
* Gets an attribute from the underlying DOM element.
* (DEPRECATED way of accessing the DOM, replacement coming)
*/
// TODO(tbosch): Here we expose the real DOM element.
// We need a more general way to read/write to the DOM element
// via a proper abstraction in the render layer
getAttribute(name: string): string {
return normalizeBlank(DOM.getAttribute(this.domElement, name));
}
示例7: get
get(param: string): string { return normalizeBlank(StringMapWrapper.get(this.params, param)); }
示例8: overrideOnEventDone
overrideOnEventDone(onEventDoneFn: Function, waitForAsync: boolean = false): void {
this._onEventDone = normalizeBlank(onEventDoneFn);
}
示例9: overrideOnTurnStart
overrideOnTurnStart(onTurnStartFn: Function): void {
this._onTurnStart = normalizeBlank(onTurnStartFn);
}