prince89arora / angular2-multifield

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Angular2 MultiField Example

Brunch + Angular2

How to Install & Run

  • Install (if you don't have them):
    • Node.js: brew install node on OS X (or download installer from site). Requires a fairly recent version of Node.
    • Brunch: npm install -g brunch (optional)
    • Brunch plugins and dependencies: npm install.
  • Run:
    • npm start — watches the project with continuous rebuild. This will also launch HTTP server with pushState.
    • npm run build:prod — builds minified project for production
  • Learn:
    • public/ dir is fully auto-generated and served by HTTP server. Write your code in app/ dir.
    • Place static files you want to be copied from app/assets/ to public/.
    • Brunch site, Getting started guide

How to use Multifield widget

Add and import MulriFieldComponent from multi directory. Use below syntax to initialize.

<multi-field>
  	<div>
  		<input type="text" placeholder="enter text.."/> 		
  	</div>	
  </multi-field>

Configurations

  • min: Add this to configure minimum number of replications on load.
  • max: Add this to configure maximum number of replications that can be added. Ex:
<multi-field min=1 max=4>
  	<div>
  		<input type="text" placeholder="enter text.."/> 		
  	</div>	
  </multi-field>

About


Languages

Language:TypeScript 65.0%Language:HTML 18.0%Language:JavaScript 11.8%Language:CSS 5.2%