Started xosForm docs
diff --git a/views/ngXosLib/gulp/ngXosHelpers.js b/views/ngXosLib/gulp/ngXosHelpers.js
index f046681..5ff7d00 100644
--- a/views/ngXosLib/gulp/ngXosHelpers.js
+++ b/views/ngXosLib/gulp/ngXosHelpers.js
@@ -58,6 +58,7 @@
scripts: [
'http://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js',
'http://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular-animate.min.js',
+ 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.11.2/lodash.js',
`${options.ngXosVendor}ngXosHelpers.js`
],
styles: [
diff --git a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/form.component.js b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/form.component.js
index 4d53a92..35fe286 100644
--- a/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/form.component.js
+++ b/views/ngXosLib/xosHelpers/src/ui_components/dumbComponents/form.component.js
@@ -35,17 +35,31 @@
* @element ANY
* @scope
* @example
- <example module="sampleAlert1">
+ <example module="sampleForm">
<file name="index.html">
- <div ng-controller="SampleCtrl1 as vm">
-
+ <div ng-controller="SampleCtrl as vm">
+ <xos-form ng-model="model" config="config"></xos-form>
</div>
</file>
<file name="script.js">
- angular.module('sampleAlert1', ['xos.uiComponents'])
- .controller('SampleCtrl1', function(){
- this.config1 = {
- exclude: ['password', 'last_login']
+ angular.module('sampleForm', ['xos.uiComponents'])
+ .controller('SampleCtrl', function(){
+ this.model = {
+
+ }
+ this.config = {
+ exclude: ['password', 'last_login'],
+ formName: 'sampleForm',
+ actions: [
+ {
+ label: 'Save',
+ icon: 'ok', // refers to bootstraps glyphicon
+ cb: (user) => { // receive the model
+ console.log(user);
+ },
+ class: 'success'
+ }
+ ]
};
});
</file>