-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Comments
@jeppebemad Yeah, I should add these into our actual documentation. :) Thanks for the nudge. |
Cool - thanks :) |
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 |
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. |
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? |
@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? |
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, |
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 |
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).
The text was updated successfully, but these errors were encountered: