Added delete button to list view
Change-Id: I7ebbc131e59365363c649a8f1eadebb46767ccda
diff --git a/src/app/core/nav/nav.ts b/src/app/core/nav/nav.ts
index 2b6cae4..31831e1 100644
--- a/src/app/core/nav/nav.ts
+++ b/src/app/core/nav/nav.ts
@@ -37,9 +37,6 @@
}
isSelected(navId: string, navSelected: string) {
- console.log(navId, navSelected);
- // TODO activate only one state
-
const activeRoute = this.$state.current.name;
const separateRoutes = activeRoute.split('.');
diff --git a/src/app/core/services/helpers/config.helpers.ts b/src/app/core/services/helpers/config.helpers.ts
index 599edaf..a9d23f3 100644
--- a/src/app/core/services/helpers/config.helpers.ts
+++ b/src/app/core/services/helpers/config.helpers.ts
@@ -76,7 +76,7 @@
};
if (f.name === 'id' || f.name === 'name') {
- // NOTE can we find a better method to generalize?
+ // NOTE can we find a better method to generalize the route?
col.link = item => `#/core${baseUrl.replace(':id?', item.id)}`;
}
diff --git a/src/index.ts b/src/index.ts
index 4ba1f3d..b03f4b4 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -100,7 +100,13 @@
color: 'red',
cb: (item) => {
console.log(item);
- item.$delete();
+ item.$delete()
+ .then(res => {
+ console.log(res);
+ })
+ .catch(err => {
+ console.error(err);
+ });
}
}
]