Created
April 11, 2017 14:51
-
-
Save anonymous/0e97a45fcc4bb0025e277da7a9b010e0 to your computer and use it in GitHub Desktop.
custom event not working
This file contains 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
<formio-hero></formio-hero> | |
<div class="container"> | |
<formio [form]='form'></formio> | |
<div class="well text-center" *ngIf="auth.authenticated"> | |
<h3 *ngIf="auth.user.data">You are logged in as <strong>{{ auth.user.data.email }}</strong>!</h3> | |
</div> | |
</div> |
This file contains 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} from '@angular/core'; | |
import { FormioAuthService } from 'ng2-formio/auth'; | |
@Component({ | |
template: require('./home.html') | |
}) | |
export class HomeComponent { | |
form; | |
constructor(public auth: FormioAuthService) { | |
this.form={ | |
"components":[ | |
{ | |
"input":true, | |
"label":"Test Me", | |
"tableView":false, | |
"key":"ud-9-1-sh1", | |
"size":"md", | |
"leftIcon":"", | |
"rightIcon":"", | |
"block":false, | |
"action":"event", | |
"disableOnInvalid":false, | |
"theme":"primary", | |
"type":"button", | |
"event":"testEvent" | |
}, | |
], | |
"display":'form' | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment