From 9fe28806beea4e81cbfa3bad980ab470a58bd38d Mon Sep 17 00:00:00 2001 From: Tim Otten <totten@civicrm.org> Date: Wed, 14 Jun 2017 13:54:56 -0700 Subject: [PATCH] AngularJS Quick Start - Improve code snippets --- docs/framework/angular/quickstart.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/framework/angular/quickstart.md b/docs/framework/angular/quickstart.md index 2a1b20ba..9759a552 100644 --- a/docs/framework/angular/quickstart.md +++ b/docs/framework/angular/quickstart.md @@ -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 -- GitLab