Created
June 14, 2018 02:21
-
-
Save travist/4d8ea88a1ea3683c24125b560be86c39 to your computer and use it in GitHub Desktop.
Access Core renderer within Angular renderer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, AfterViewInit, ViewChild } from '@angular/core'; | |
import { FormioComponent } from 'angular-formio'; | |
@Component({ | |
template: '<formio src="https://examples.form.io/example"></formio>' | |
}) | |
export class FormRenderComponent implements AfterViewInit { | |
@ViewChild(FormioComponent) formioComponent: FormioComponent; | |
ngAfterViewInit() { | |
this.formioComponent.ready.then((formio) => { | |
// At this point, formio is the Core renderer and is an instance as you would see @ http://formio.github.io/formio.js/app/examples/hosted.html | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment