Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Q3 of 3

angular.module('foobar', [])
  .controller("coolCtrl", function($scope.someNumber ){

                $scope.someNumber = 4;

         });

Can some one please explain this question to me. Thx

3 Answers

angular.module('foobar', [])
  .controller("coolCtrl", function($scope){
         $scope.someNumber = 4;
         });

thanks Ken, I solved it :)

Ken Alger
Ken Alger
Treehouse Teacher

Nice work!

They say that Angular has a steep learning curve. I would have to concur. Way to stay with it and get through the challenge!

Happy coding,
Ken

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Ellie;

What is your question or what are you not understanding exactly?

Thanks,
Ken

Hi Ken, Q: In the body of the "coolController" callback function, attach a variable to $scope called someNumber with a value between 1 and 5.

I tried ($scope.someNumber ) but not sure how to add value (value between 1 and 5.) I don't know how to solve it. I tried above code it didn't work. {
$scope.someNumber = 4;

});

Thx

Ken Alger
STAFF
Ken Alger
Treehouse Teacher

Ellie;

In the anonymous callback function() from Task 2 we only want $scope to be the parameter. The someNumber variable gets assigned to the scope then in Task 3.

Post back if you are still stuck.

Happy coding,
Ken