Skip to content
Snippets Groups Projects
Commit 9fe28806 authored by totten's avatar totten
Browse files

AngularJS Quick Start - Improve code snippets

parent d4a92258
No related branches found
No related tags found
No related merge requests found
......@@ -66,15 +66,18 @@ Angular runtime, e.g.
!!! tip "Tip: angular.module() and CRM.angRequires()"
The list of dependencies is declared once in PHP and once in JS. To
remove this duplication, replace the array `['ngRoute', 'crmUi', 'crmUtil']`
with a function call `CRM.angRequires('aboutme')`.
remove this duplication, call `CRM.angRequires(...)`, as in:
```js
angular.module('aboutme', CRM.angRequires('aboutme'));
```
## Add an Angular-based page
Now let's add a new Angular-based page. This page will require a `route`
with a `controller` and an HTML template. The command `civix
generate:angular-page` will create each of these:
with a `controller` and an HTML template. The command
`civix generate:angular-page` will create each of these:
```
$ civix generate:angular-page EditCtrl about/me
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment