Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
didCreateElement(component: EmberishCurlyComponent, element: Element, operations: ElementOperations): void {
component.element = element;
operations.setAttribute('id', PrimitiveReference.create(`ember${component._guid}`), false, null);
operations.setAttribute('class', PrimitiveReference.create('ember-view'), false, null);
let bindings = component.attributeBindings;
let rootRef = new UpdatableReference(component);
if (bindings) {
for (let i = 0; i < bindings.length; i++) {
let attribute = bindings[i];
let reference = rootRef.get(attribute) as PathReference;
operations.setAttribute(attribute, reference, false, null);
}
}
}
didCreateElement(component: EmberishCurlyComponent, element: Element, operations: ElementOperations): void {
component.element = element;
operations.setAttribute('id', PrimitiveReference.create(`ember${component._guid}`), false, null);
operations.setAttribute('class', PrimitiveReference.create('ember-view'), false, null);
let bindings = component.attributeBindings;
let rootRef = new UpdatableReference(component);
if (bindings) {
for (let i = 0; i < bindings.length; i++) {
let attribute = bindings[i];
let reference = rootRef.get(attribute) as PathReference;
operations.setAttribute(attribute, reference, false, null);
}
}
}
toConditionalReference(reference: Reference): Reference {
if (isConst(reference)) {
return PrimitiveReference.create(emberToBool(reference.value()));
}
return new EmberishConditionalReference(reference);
}