Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

angular.hint.onMessage is empty function #81

Closed
wkwiatek opened this issue May 8, 2015 · 4 comments
Closed

angular.hint.onMessage is empty function #81

wkwiatek opened this issue May 8, 2015 · 4 comments
Assignees

Comments

@wkwiatek
Copy link

wkwiatek commented May 8, 2015

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
Copy link
Contributor

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

@SomeKittens
Copy link
Member

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.

@SomeKittens SomeKittens self-assigned this May 9, 2015
SomeKittens added a commit that referenced this issue May 10, 2015
Now that we've switched to an event emitter, log was no longer used and was causing confusion.
The major change here is that once we emit an event, it is not stored.  If this turns out to be a big deal, we can implement a message storage module.

Closes #81
SomeKittens added a commit that referenced this issue May 10, 2015
Now that we've switched to an event emitter, log was no longer used and was causing confusion.
The major change here is that once we emit an event, it is not stored.  If this turns out to be a big deal, we can implement a message storage module.

Closes #81

tweaked test
@wkwiatek
Copy link
Author

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
Copy link
Member

@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 #85 to track this). A quick workaround would be to enter angular.hint.onAny(console.log.bind(console)) into the console.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants