本文整理汇总了TypeScript中angular2/src/core/facade/collection.MapWrapper类的典型用法代码示例。如果您正苦于以下问题:TypeScript MapWrapper类的具体用法?TypeScript MapWrapper怎么用?TypeScript MapWrapper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MapWrapper类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: testChangeDetector
export function testChangeDetector(changeDetectorFactory: Function): string[] {
var dispatcher = new TestDispatcher([], []);
var cd = changeDetectorFactory(dispatcher);
var ctx = new SomeComponent();
ctx.someProp = 'someValue';
var locals = new Locals(null, MapWrapper.createFromStringMap({'someVar': null}));
cd.hydrate(ctx, locals, dispatcher, new TestPipes());
cd.detectChanges();
return dispatcher.log;
}
开发者ID:hankduan,项目名称:angular,代码行数:10,代码来源:change_detector_compiler_spec.ts
示例2: _populateViewLocals
_populateViewLocals(view: viewModule.AppView, elementInjector: eli.ElementInjector,
boundElementIdx: number): void {
if (isPresent(elementInjector.getDirectiveVariableBindings())) {
MapWrapper.forEach(elementInjector.getDirectiveVariableBindings(), (directiveIndex, name) => {
if (isBlank(directiveIndex)) {
view.locals.set(name, view.elementRefs[boundElementIdx].nativeElement);
} else {
view.locals.set(name, elementInjector.getDirectiveAtIndex(directiveIndex));
}
});
}
}
开发者ID:chiragjraval,项目名称:AdvisroySystemPOC,代码行数:12,代码来源:view_manager_utils.ts
示例3: clearValues
clearValues(): void { MapWrapper.clearValues(this.current); }
开发者ID:beta3000,项目名称:hola-angular2,代码行数:1,代码来源:locals.ts
示例4: it
it('should return a list of keys values', () => {
var m = new Map();
m.set('a', 'b');
expect(MapWrapper.keys(m)).toEqual(['a']);
expect(MapWrapper.values(m)).toEqual(['b']);
});
开发者ID:hankduan,项目名称:angular,代码行数:6,代码来源:collection_spec.ts
示例5: beforeEach
beforeEach(() => {
locals = new Locals(null, MapWrapper.createFromPairs([['key', 'value'], ['nullKey', null]]));
});
开发者ID:hankduan,项目名称:angular,代码行数:3,代码来源:locals_spec.ts
示例6: viewDestroyed
viewDestroyed(view: AppView) {
var viewId = _allIdsByView.get(view);
MapWrapper.delete(_allIdsByView, view);
MapWrapper.delete(_allViewsById, viewId);
}
开发者ID:chiragjraval,项目名称:AdvisroySystemPOC,代码行数:5,代码来源:debug_element_view_listener.ts
注:本文中的angular2/src/core/facade/collection.MapWrapper类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论