crud add
This commit is contained in:
parent
750845b9fe
commit
9995d815f9
|
@ -9,7 +9,7 @@ core.module.config(function($stateProvider, $urlRouterProvider) {
|
|||
$stateProvider
|
||||
.state('index', {
|
||||
url: "/index",
|
||||
template :'<customer-add></customer-add>',
|
||||
template :'<customer-index></customer-index>',
|
||||
resolve: {
|
||||
loader: function($ocLazyLoad, $q){
|
||||
return $q((resolve) => {
|
||||
|
|
|
@ -2,3 +2,4 @@ export * from './module';
|
|||
export * from './customer/routes';
|
||||
|
||||
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 {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);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue