Skip to content

Instantly share code, notes, and snippets.

@robwormald
Last active December 14, 2016 09:08
Show Gist options
  • Save robwormald/240b90ecf21af655ecf28a22a35f5627 to your computer and use it in GitHub Desktop.
Save robwormald/240b90ecf21af655ecf28a22a35f5627 to your computer and use it in GitHub Desktop.
<p>hello {{name}}</p>
@Component({
selector: 'hello-component',
templateUrl: 'hello-component.html'
})
export class HelloComponent {
name: string;
constructor(){
this.name = 'World';
setTimeout(() => this.name = 'World!!!', 1000);
}
}
export class View_HelloComponent0 extends AppView {
constructor(viewUtils, parentView, parentIndex, parentElement) {
super(View_HelloComponent0, renderType_HelloComponent, ViewType.COMPONENT, viewUtils, parentView, parentIndex, parentElement, ChangeDetectorStatus.CheckAlways);
this._expr_2 = UNINITIALIZED;
}
createInternal(rootSelector) {
const parentRenderNode = this.renderer.createViewRoot(this.parentElement);
this._el_0 = createRenderElement(this.renderer, parentRenderNode, 'p', EMPTY_INLINE_ARRAY, null);
this._text_1 = this.renderer.createText(this._el_0, '', null);
this.init(null, (this.renderer.directRenderer ? null : [
this._el_0,
this._text_1
]), null);
return null;
}
detectChangesInternal(throwOnChange) {
const currVal_2 = inlineInterpolate(1, 'hello ', this.context.name, '');
if (checkBinding(throwOnChange, this._expr_2, currVal_2)) {
this.renderer.setText(this._text_1, currVal_2);
this._expr_2 = currVal_2;
}
}
}
@taras
Copy link

taras commented Dec 14, 2016

Is it possible to see an entire compiled app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment