Skip to content

Commit 5daa94b

Browse files
committed
Add Angular js docs
1 parent 11f9d67 commit 5daa94b

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

docs/integrations/angular.rst

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
AngularJS
2+
=========
3+
4+
Installation
5+
------------
6+
7+
Start by adding the ``raven.js`` script tag to your page. It should go **before** your application code.
8+
9+
Example:
10+
11+
.. sourcecode:: html
12+
13+
<script src="https://cdn.ravenjs.com/1.2.0/angular,native/raven.min.js"></script>
14+
15+
<!-- your application code below -->
16+
<script src="static/app.js"></script>
17+
18+
Additionally, inside your main Angular application module, you need to declare ``ngRaven`` as a
19+
module dependency:
20+
21+
.. code-block:: javascript
22+
23+
var myApp = angular.module('myApp', [
24+
'ngRaven',
25+
'ngRoute',
26+
'myAppControllers',
27+
'myAppFilters'
28+
]);
29+
30+
Configuring the Client
31+
----------------------
32+
33+
You need to configure raven.js to use your Sentry DSN. This should happen immediately after
34+
your raven.js script include:
35+
36+
.. code-block:: html
37+
38+
<script src="https://cdn.ravenjs.com/1.2.0/angular,native/raven.min.js"></script>
39+
<script>
40+
Raven.config('___PUBLIC_DSN___').install();
41+
</script>
42+
43+
At this point, Raven is ready to capture any uncaught exception via standard hooks
44+
in addition to Backbone specific hooks.

docs/sentry-doc-config.json

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
"index#reporting-errors"
1111
]
1212
},
13+
"javascript.angular": {
14+
"name": "Angular",
15+
"type": "framework",
16+
"doc_link": "integrations/angular/",
17+
"wizard": [
18+
"integrations/angular#installation",
19+
"integrations/angular#configuring-the-client"
20+
]
21+
},
1322
"javascript.backbone": {
1423
"name": "Backbone",
1524
"type": "framework",

0 commit comments

Comments
 (0)