crud add
This commit is contained in:
parent
750845b9fe
commit
9995d815f9
|
@ -9,7 +9,7 @@ core.module.config(function($stateProvider, $urlRouterProvider) {
|
||||||
$stateProvider
|
$stateProvider
|
||||||
.state('index', {
|
.state('index', {
|
||||||
url: "/index",
|
url: "/index",
|
||||||
template :'<customer-add></customer-add>',
|
template :'<customer-index></customer-index>',
|
||||||
resolve: {
|
resolve: {
|
||||||
loader: function($ocLazyLoad, $q){
|
loader: function($ocLazyLoad, $q){
|
||||||
return $q((resolve) => {
|
return $q((resolve) => {
|
||||||
|
|
|
@ -2,3 +2,4 @@ export * from './module';
|
||||||
export * from './customer/routes';
|
export * from './customer/routes';
|
||||||
|
|
||||||
export {NAME as CUSTOMER_INDEX, COMPONENT as CUSTOMER_INDEX_COMPONENT} from './customer/index'
|
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'
|
|
@ -0,0 +1 @@
|
||||||
|
<vn-button text='customer add'></vn-button>
|
|
@ -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);
|
|
@ -1 +1 @@
|
||||||
<div>index from component</div>
|
<customer-add users="$ctrl.users"></customer-add>
|
|
@ -1,14 +1,13 @@
|
||||||
import template from './index.html';
|
import template from './index.html';
|
||||||
import {module} from '../../module';
|
import {module} from '../../module';
|
||||||
|
|
||||||
export const NAME = 'customerAdd';
|
export const NAME = 'customerIndex';
|
||||||
export const COMPONENT = {
|
export const COMPONENT = {
|
||||||
template: template,
|
template: template,
|
||||||
controller: function() {
|
controller :function(){
|
||||||
this.user = {name: 'world'};
|
this.users = {id:10,name:"xxxx"};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.component(NAME, COMPONENT);
|
module.component(NAME, COMPONENT);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue