diff --git a/@salix/app/src/routes.js b/@salix/app/src/routes.js index 4259fcd63..25d5fd78d 100644 --- a/@salix/app/src/routes.js +++ b/@salix/app/src/routes.js @@ -9,7 +9,7 @@ core.module.config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('index', { url: "/index", - template :'', + template :'', resolve: { loader: function($ocLazyLoad, $q){ return $q((resolve) => { diff --git a/@salix/crud/src/crud.js b/@salix/crud/src/crud.js index 7d4627b16..806f1c41a 100644 --- a/@salix/crud/src/crud.js +++ b/@salix/crud/src/crud.js @@ -1,4 +1,5 @@ export * from './module'; export * from './customer/routes'; -export {NAME as CUSTOMER_INDEX, COMPONENT as CUSTOMER_INDEX_COMPONENT} from './customer/index' \ No newline at end of file +export {NAME as CUSTOMER_INDEX, COMPONENT as CUSTOMER_INDEX_COMPONENT} from './customer/index' +export {NAME as CUSTOMER_ADD, COMPONENT as CUSTOMER_ADD_COMPONENT} from './customer/index/add' \ No newline at end of file diff --git a/@salix/crud/src/customer/index/add.html b/@salix/crud/src/customer/index/add.html new file mode 100644 index 000000000..308197934 --- /dev/null +++ b/@salix/crud/src/customer/index/add.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/@salix/crud/src/customer/index/add.js b/@salix/crud/src/customer/index/add.js new file mode 100644 index 000000000..903b4606f --- /dev/null +++ b/@salix/crud/src/customer/index/add.js @@ -0,0 +1,16 @@ +import template from './add.html'; +import {module} from '../../module'; + +export const NAME = 'customerAdd'; + +export const COMPONENT = { + template: template, + bindings :{ + users: '<' + }, + controller :function($scope, $element, $attrs){ + console.log(this.users); + } +}; + +module.component(NAME, COMPONENT); \ No newline at end of file diff --git a/@salix/crud/src/customer/index/index.html b/@salix/crud/src/customer/index/index.html index bf833f5d0..1f45f7a81 100644 --- a/@salix/crud/src/customer/index/index.html +++ b/@salix/crud/src/customer/index/index.html @@ -1 +1 @@ -
index from component
\ No newline at end of file + \ No newline at end of file diff --git a/@salix/crud/src/customer/index/index.js b/@salix/crud/src/customer/index/index.js index 3f404ca5a..31b48466b 100644 --- a/@salix/crud/src/customer/index/index.js +++ b/@salix/crud/src/customer/index/index.js @@ -1,14 +1,13 @@ import template from './index.html'; import {module} from '../../module'; -export const NAME = 'customerAdd'; +export const NAME = 'customerIndex'; export const COMPONENT = { template: template, - controller: function() { - this.user = {name: 'world'}; + controller :function(){ + this.users = {id:10,name:"xxxx"}; } }; - module.component(NAME, COMPONENT);