integración customer

This commit is contained in:
nelo 2016-11-09 14:09:12 +01:00
parent afffc2f8a8
commit 011d9d7dc9
6 changed files with 45 additions and 13 deletions

View File

@ -1,7 +1,7 @@
{ {
"restApiRoot": "/api", "restApiRoot": "/api",
"host": "0.0.0.0", "host": "0.0.0.0",
"port": 3000, "port": 3002,
"remoting": { "remoting": {
"context": false, "context": false,
"rest": { "rest": {

View File

@ -9,7 +9,7 @@ var corsOptions = {
} }
module.exports = function() { module.exports = function() {
return cors(corsOptions); return cors({origin: true});
}; };

View File

@ -1,9 +1,27 @@
<!doctype html>
<html> <html>
<head> <head>
<title>Ejemplo1</title> <meta charset="UTF-8">
</head> <title>Salix</title>
<body> </head>
<script type="text/javascript" src="/salix/config.js"> </script> <body>
<p>Párrafo de ejemplo</p> <div id="app">
</body> <div ui-view></div>
</html>fore <a ui-sref="index">index</a>
<a ui-sref="add">add</a>
<a ui-sref="edit">edit</a>
<a ui-sref="delete">delete</a>
<a ui-sref="navigation">navigation</a>
</div>
<script
type="text/javascript"
src="/static/salix.routes.js">
</script>
<script
type="text/javascript"
src="/static/salix.app.js"
selector="#app">
</script>
</body>
</html>

View File

@ -6,3 +6,17 @@ export {NAME as CUSTOMER_ADD,
COMPONENT as CUSTOMER_ADD_COMPONENT} from './customer/index/add'; COMPONENT as CUSTOMER_ADD_COMPONENT} from './customer/index/add';
export {NAME as CUSTOMER_LIST, export {NAME as CUSTOMER_LIST,
COMPONENT as CUSTOMER_LIST_COMPONENT} from './customer/index/list'; COMPONENT as CUSTOMER_LIST_COMPONENT} from './customer/index/list';
export {NAME as NAVIGATION_INDEX,
COMPONENT as NAVIGATION_INDEX_COMPONENT} from './navigation/index';
export {NAME as NAVIGATION_ITEM,
COMPONENT as NAVIGATION_ITEM_COMPONENT} from './navigation/index/item';
export {NAME as NAVIGATION_LIST,
COMPONENT as NAVIGATION_LIST_COMPONENT} from './navigation/index/list';
export {NAME as NAVIGATION_HEADER,
COMPONENT as NAVIGATION_HEADER_COMPONENT} from './navigation/index/header';
export {NAME as NAVIGATION_MAIN,
COMPONENT as NAVIGATION_MAIN_COMPONENT} from './navigation/index/main';
export {NAME as NAVIGATION_COMPOSE,
COMPONENT as NAVIGATION_COMPOSE_COMPONENT} from './navigation/index/compose';

View File

@ -4,10 +4,10 @@ import {module} from '../../module';
export const NAME = 'customerIndex'; export const NAME = 'customerIndex';
export const COMPONENT = { export const COMPONENT = {
template: template, template: template,
controller: function() { controller: function($http) {
this.users = [{id: 10, name: "xxxx"}]; this.users = [{id: 10, name: "xxxx"}];
this.search = function() { this.search = function() {
$http.post('http://localhost:3000/api/Customers', {name: 'nelo'}); $http.post('/customer/api/Customers', {name: 'nelo'});
}; };
} }
}; };

View File

@ -1,5 +1,5 @@
<header class="demo-drawer-header"> <header class="demo-drawer-header">
<img src="images/user.jpg" class="demo-avatar"> <!--<img src="images/user.jpg" class="demo-avatar">-->
</header> </header>
<nav class="demo-navigation mdl-navigation mdl-color--light-green"> <nav class="demo-navigation mdl-navigation mdl-color--light-green">
<navigation-item ng-repeat="item in $ctrl.items" item ="item"></navigation-item> <navigation-item ng-repeat="item in $ctrl.items" item ="item"></navigation-item>