[CORD-873] CRUD for Core and Service model from Chameleon
Change-Id: I45c533feba6720b82de3681d862773047e7fd6f8
diff --git a/src/decorators.ts b/src/decorators.ts
index 6f2628d..c4543e2 100644
--- a/src/decorators.ts
+++ b/src/decorators.ts
@@ -1,7 +1,9 @@
export default function XosLogDecorator($provide: ng.auto.IProvideService) {
$provide.decorator('$log', function($delegate: any) {
const isLogEnabled = () => {
- return window.location.href.indexOf('debug=true') >= 0;
+ // NOTE to enable debug, in the broser console set: localStorage.debug = 'true'
+ // NOTE to disable debug, in the broser console set: localStorage.debug = 'false'
+ return window.localStorage.getItem('debug') === 'true';
};
// Save the original $log.debug()
let logFn = $delegate.log;