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 trialerika harvey
Courses Plus Student 14,540 PointsI'm pretty sure i"m reading this completely wrong, but i'm confused as to what it is asking
some guidance would be awesome. I"m trying to add scope to a variable called someNumber with a value between one and five. Is this a range where I have to do math.random(), or is it me picking one number or am i completely off track?
angular.module('foobar', [])
.controller("coolCtrl",function($scope){
var someNumber = $scope.value(4);
});
2 Answers
Jesse Zelaya
13,599 PointsThis is what you're looking for
angular.module('foobar', [])
.controller('coolCtrl', function($scope){
$scope.someNumber = 4;
})
erika harvey
Courses Plus Student 14,540 Pointsthank you so much! i knew i was making it harder than it had to be.
Jesse Zelaya
13,599 PointsDeanna O'Neal, it shouldn't be an issue for this challenge, but it is good practice to use semi-colons to prevent errors. Didn't notice I removed it. Thanks for catching that!
Deanna O'Neal
7,278 PointsDeanna O'Neal
7,278 PointsWhy did you remove the final semicolon?