Skip to content

Commit 7c5e03c

Browse files
wzr1337btford
authored andcommitted
fix(readme): added documentation of route adding
1 parent e81b624 commit 7c5e03c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

readme.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,23 @@ yo angular
4747
### Route
4848
Generates a controller and view, and configures a route in `app/scripts/app.js` connecting them.
4949

50+
Example:
51+
```bash
52+
yo angular:route myroute
53+
```
54+
55+
Produces `app/scripts/controllers/myroute.js`:
56+
```javascript
57+
angular.module('myMod').controller('MyrouteCtrl', function ($scope) {
58+
// ...
59+
});
60+
```
61+
62+
Produces `app/views/myroute.html`:
63+
```html
64+
<p>This is the myroute view</p>
65+
```
66+
5067
### Controller
5168
Generates a controller in `app/scripts/controllers`.
5269

0 commit comments

Comments
 (0)