Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for configuring the angular plugin #235

Closed
jeppebemad opened this issue Aug 4, 2014 · 8 comments
Closed

Documentation for configuring the angular plugin #235

jeppebemad opened this issue Aug 4, 2014 · 8 comments

Comments

@jeppebemad
Copy link

Spent some time figuring out how to configure Raven using the angular plugin. Couldn't find anything in any documentation, so this might be of use to someone, sometime.

Add this in the angular configuration phase:

myApp.value("RavenConfig", {
dsn: 'https://[email protected]/xxxx',
config: {
whitelistUrls: ['myurl.com/scripts']
//Additional config options here
}
});

Note that this may not show errors that happen before angular is bootstrapped. To get that, use normal normal configuration, and use dummy RavenConfig object (which will yield an error saying that Raven already has been configured).

@mattrobenolt
Copy link
Contributor

@jeppebemad Yeah, I should add these into our actual documentation. :) Thanks for the nudge.

@jeppebemad
Copy link
Author

Cool - thanks :)

@mattrobenolt
Copy link
Contributor

I'll accept a pull request for this. I'm not an Angular user, so I'm probably not the best person to document this.

It can go right in the angular.js plugin file I think at the moment since docs don't really have a section for documenting plugins yet.

@sekimura
Copy link

sekimura commented Feb 9, 2015

hi there. I'm the one who use Raven-js with angular. https://github.com/gdi2290/angular-raven this Readme page helped me and had enough info to configure it correctly.

@cerdman
Copy link

cerdman commented Feb 11, 2015

I am willing to help however as this error is insanely annoying in headerless testing (only place i get it) and i really dont want to mock/stub the entire ravenjs lib...

If I figure out a workaround to check for Raven already being config'd in angular.js plugin in the context of window shall I pr?

@sekimura
Copy link

@cerdman https://github.com/getsentry/raven-js/blob/master/src/raven.js#L724 there is Raven.isSetup() to check if Raven is configured or not. Although I am not sure how it could be helpful to configure angular-raven plugin.

I wonder if adding a link https://github.com/gdi2290/angular-raven to docs could be enough or not. Thoughts?

@henry74
Copy link

henry74 commented Apr 17, 2015

So I've installed angular-raven using bower, but I'm curious whether I need the angular plugin included with the raven-js source files. If so, how do I actually include the plugin code into my angular project? it's not clear what I'm supposed to do with the plugin code snippet.

Thanks,
Henry

@benvinegar
Copy link
Contributor

Docs finally added in #405

You can read them here: https://github.com/getsentry/raven-js/blob/master/docs/integrations/angular.rst

And they'll soon be published at https://docs.getsentry.com

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

No branches or pull requests

6 participants