You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to target angular 2 components instead of node modules ? #33
exportclassAppModule{constructor(){Minilog.suggest.defaultResult=false;// Enable Whitelist ModeMinilog.suggest.clear().allow(this.constructor.name,'warn');Minilog.enable();letlogger=Minilog(this.constructor.name);logger.debug('will not be displayed');logger.info('will not be displayed');logger.log('will not be displayed');logger.warn('a warning will be displayed');logger.error('an error will be displayed');}}
Activity
riddla commentedon Nov 14, 2016
In ES6/Typescript you could make use of the constructor name property:
I created a running example at http://plnkr.co/edit/4JsuWFFpMFpT4v8eNSHs?p=preview.