Closed viktorsmari closed 3 years ago
Problem solved in 58dbf03c277743fa519b159980e2fbbbc422ff61 by removing the content
function
Hi @viktorsmari,
Trying this again in chrome, it doesn't seem to delete it either. Testing with device 13368
gives the following console error:
Where are you deleting the kits? Which URL?
If I delete them here, it works with no console errors: https://smartcitizen.me/profile/kits
Hi,
Sorry for the lack of detail, it's in the device page itself, in this case would be scrolling down, right below the graph (this would be another device, but shows where the button is):
Turns out the method for removing kits lives in 2 places. I had only fixed one of them before.
showkit.controller
myprofile.controller
Ideally I would refactor this into having only 1 method (DRY principle) but I don't know how to do it in AngularJS. There is probably a reason for it living in 2 places, maybe we will find out later.
Method now updated in both places :+1:
Just tested it and works, great! We can close it for now and reopen when you want to refactor?
Expected behaviour
Device should be deleted
Actual behaviour
Button does nothing - errors in dev console
How to reproduce?
Error: