Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Add note about needing ng-app="myApp" in Step 5 #7655

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/content/tutorial/step_05.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ anonymous function when registering the controller:
phonecatApp.controller('PhoneListCtrl', ['$scope', '$http', function($scope, $http) {...}]);
```

If you use the anonymous function syntax, the way you initialize your Angular app needs to change.
Instead of a simple `ng-app` in your markup, you'll need `ng-app='phonecatApp'`. Otherwise, you'll
get errors that your controller is undefined (not a function).

From this point onward, we're going to use the inline method in the tutorial. With that in mind,
let's add the annotations to our `PhoneListCtrl`:

Expand Down