angular / angular-hint

run-time hinting for AngularJS applications
362 stars 45 forks source link

angular.hint.onMessage is empty function #81

Closed wkwiatek closed 9 years ago

wkwiatek commented 9 years ago

I couldn't make angular-hint working when using as browserify package as well as built version. The problem I met is that there is an empty function which I suppose is meant to work as logger. It's in this particular line: https://github.com/angular/angular-hint/blob/master/src/modules/log.js#L49

I've tried to run one of your examples with no success. I've added generated hint.js file to this plunker: http://plnkr.co/edit/qxaz82gNQjiPyIVt2v9g

Also the dependencies seems to be a little bit outdated themselves. It may be a problem with node 0.12 which I use.

erwinmombay commented 9 years ago

hey @wkwiatek thanks for reporting. you don't happen to have a log of any errors you saw did you?

SomeKittens commented 9 years ago

Good find - we forgot to pull this out earlier.

angular.hint is now an EventEmitter, so you can add event listeners to that. We'll have to figure out what to do with the logging.

wkwiatek commented 9 years ago

Hi guys. Thanks for your reply.

@SomeKittens I changed the version in my project to your fixed branch and it seems to emit events now but I can't find any place where they're handled. Am I wrong or is there any other way to see messages from angular-hint in that version?

SomeKittens commented 9 years ago

@wkwiatek Glad to see the update works for you. Currently, there isn't a way to get angular-hint to do this for you (I've opened https://github.com/angular/angular-hint/issues/85 to track this). A quick workaround would be to enter angular.hint.onAny(console.log.bind(console)) into the console.