本文整理汇总了TypeScript中angular2/src/core/facade/collection.StringMapWrapper.contains方法的典型用法代码示例。如果您正苦于以下问题:TypeScript StringMapWrapper.contains方法的具体用法?TypeScript StringMapWrapper.contains怎么用?TypeScript StringMapWrapper.contains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2/src/core/facade/collection.StringMapWrapper
的用法示例。
在下文中一共展示了StringMapWrapper.contains方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: isPropertyUpdated
export function isPropertyUpdated(changes: {[key: string]: any}, viewModel: any): boolean {
if (!StringMapWrapper.contains(changes, "model")) return false;
var change = changes["model"];
if (change.isFirstChange()) return true;
return !looseIdentical(viewModel, change.currentValue);
}
示例2:
StringMapWrapper.forEach(control.errors, (value, error) => {
if (!StringMapWrapper.contains(res, error)) {
res[error] = [];
}
var current: any[] = res[error];
current.push(control);
});
示例3: to
to(channel: string): MockEventEmitter {
if (!StringMapWrapper.contains(this._channels, channel)) {
this._channels[channel] = new MockEventEmitter();
}
return this._channels[channel];
}
示例4: initChannel
initChannel(channel: string, runInZone = true) {
if (!StringMapWrapper.contains(this._channels, channel)) {
this._channels[channel] = new MockEventEmitter();
}
}
示例5: from
from(channel: string): MockEventEmitter {
if (!StringMapWrapper.contains(this._channels, channel)) {
throw new BaseException(`${channel} is not set up. Did you forget to call initChannel?`);
}
return this._channels[channel];
}
示例6: supports
supports(eventName: string): boolean {
eventName = eventName.toLowerCase();
return StringMapWrapper.contains(_eventNames, eventName);
}