Skip to content

Commit 50307ba

Browse files
committed
Add Angular js docs
1 parent 11f9d67 commit 50307ba

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

docs/integrations/angular.rst

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

docs/sentry-doc-config.json

Lines changed: 9 additions & 0 deletions
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)