<commit_before># angular-surveys
Angular.js survey / form builder inspired by Google Forms

[Bootstrap Demo](http://mwasiluk.github.io/angular-surveys)

[Material Design Demo](http://mwasiluk.github.io/angular-surveys/material)

## Bower

You can install this package through `Bower` :

    bower install angular-surveys --save

## Wiki
[Directives](https://github.com/mwasiluk/angular-surveys/wiki/Directives)

##Using the library

The library allows users to build a form in a Google-forms style interface. It outputs a JSON object representing the form which is then rendered by Angular.
Each JSON form-data file has an elements object representing the questions. Form elements are rendered differently by AngularJS depending on their question type (text, checkbox, radio, range, etc)

## Ionic
###Setting up for development

You'll need to run the project in two terminal windows. One for the Ionic project. The other is for the files you are changing and building.

* make a lib-dev folder in the Ionic project www/ folder
* change the imported angular-surveys/dist scripts to source from www/lib-dev/dist rather than lib/dist
* clone angular-surveys into the lib-dev folder
* npm install && bower install (if you have issue with bower check your .bowerrc to see where bower files are installing)

Your gulpfile builds a javascript file into the /dist folder based on the code in the /src folder.

To build for the ionic project, add the following to the buildModuleStream function in the gulpfile:
```javascript
var ionicTemplates = buildTemplates(tmpDir+'/templates/ionic/', moduleName, 'dist', destPrefix+'-ionic');
```
**Don't forget to import the ionic-tpls.min.js in your index.html**

* run ionic serve in the Ionic project folder
* run gulp watch in the lib-dev folder

###Using the form viewer in development

* First build a form using the Form Builder from the [Bootstrap example](http://wasiluk.io/angular-surveys/)
* The data will be placed into the model as a JSON object
* That data needs to be placed in form-data.json, which is imported using a $http.get in the app.js. You can save it locally in the www folder for testing
* In the app.js make sure the $http.get for the response-data.json is commented out. Otherwise you might have issues with your response data.
<commit_msg>updated readme based on PR comments<commit_after># angular-surveys
Angular.js survey / form builder inspired by Google Forms

[Bootstrap Demo](http://mwasiluk.github.io/angular-surveys)

[Material Design Demo](http://mwasiluk.github.io/angular-surveys/material)

## Bower

You can install this package through `Bower` :

    bower install angular-surveys --save

## Wiki
[Directives](https://github.com/mwasiluk/angular-surveys/wiki/Directives)

##Using the library

The library allows users to build a form in a Google-forms style interface. It outputs a JSON object representing the form which is then rendered by Angular.
Each JSON form-data file has an elements object representing the questions. Form elements are rendered differently by AngularJS depending on their question type (text, checkbox, radio, range, etc)

## Ionic
###Setting up for development

You'll need to run the project in two terminal windows. One is for the Ionic project. The other is for the files you are changing and building.

* make a lib-dev folder in the Ionic project www/ folder
* change the imported angular-surveys/dist scripts to source from www/lib-dev/dist rather than lib/dist
* clone angular-surveys into the lib-dev folder
* npm install && bower install (if you have issue with bower check your .bowerrc to see where bower files are installing)

**Don't forget to import the ionic-tpls.min.js in your index.html**

* run ionic serve in the Ionic project folder
* run gulp watch in the lib-dev folder

###Using the form viewer in development

* First build a form using the Form Builder from the [Bootstrap example](http://wasiluk.io/angular-surveys/)
* The data will be placed into the model as a JSON object
* That data needs to be placed in form-data.json, which is imported using a $http.get in the app.js. You can save it locally in the www folder for testing
* In the app.js make sure the $http.get for the response-data.json is commented out. Otherwise you might have issues with your response data.

{'fraction_non_alphanumeric': 0.07116279069767442, 'fraction_numerical': 0.0, 'mean_word_length': 4.349502487562189, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5052814', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1155, 'n_words': 587}