ng2-contact-form
v1.0.8
Published
ng2-contact-form ================
Downloads
7
Readme
ng2-contact-form
Contact form for Angular 2. Using:
- Angular2 (2.0.0-beta.0)
- SystemJs
- Support MaterializeCss or Bootstrap
Getting started
Install via npm::
npm install ng2-contact-form --save
Configure SystemJs. In this case the main folder is app::
Add to the file boot.ts the class ContactForm::
import {bootstrap} from 'angular2/platform/browser'; import {ContactForm} from 'ng2-contact-form/src/contact';
bootstrap(ContactForm);
Add the tag ::
Loading...
The attributes are not obligatory have default values. For example::
Value default of 'title': 'Title'.
Value default of 'firstname': 'First name'.
Value default of 'lastname': 'Last name'.
Value default of 'email': 'Email'.
Value default of 'message': 'Message'.
Value default of 'frameworkCss': 'bootstrap'.
Value default of 'send': 'Send'.
Value default of 'url': 'send'.
This last attribute (url) is the url that receives POST parameters to the backend.
- This component using API Fetch, if is necessary add polyfill https://github.com/github/fetch. Not is obligatory.
Example
Check the file index_
To the run example of the folder example::
npm install
npm start
.. _index: https://github.com/mapeveri/ng2-contact-form/blob/master/example/index.html