Learn AngularJS --- Attach promo to scope


In AngularJS , under "Learn", Instructions part 2 , page 2/11 :

" 2. Likewise, any new properties attached to $scope will become available to use in the view. In the controller, attach promo to $scope, and set its value to your own string. "

When I clicked "run", it gives the error message :

Did you add $scope.promo to the controller?

Where exactly do I type ? If someone can show me the exact syntax and how it should be written , appreciate it ...


I am having a similar issue.


I figured it out by using dot notation. The formatting for the code is not the best on this tutorial. Luckily my Javascript notes from a previous codeacademy course helped me. Put the extra scope.promo within the function;

$scope.title = 'Todd is cool!';
$scope.promo = 'This is a promo!';


Why can't we use any other names???
Also the error occurs if am trying to add another property.


you can add another property in same way as earlier :slight_smile:
$scope.hello='m another property';