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 trialDavid Keylock
1,899 PointsAngularJS Challenge Task 2 of 2
Hi
I have spent hours on this task (AngularJS Task 2) and I just can't get through it... when I click 'Recheck work' I get the message 'Oops! It looks like Task 1 is no longer passing.'
If someone could please tell me where I'm going wrong I would greatly appreciate it.
Many thanks
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<title>Angular.js</title>
</head>
<body ng-controller="myController">
<p>Hello <input ng-model= "user.name"></p>
<script src="js/angular.js"></script>
<script src="app.js"></script>
</body>
</html>
angular.module('myApp', [])
.controller('myController', ['$scope', function($scope) {
$scope.user = {
name: 'Alex'
};
}]);
1 Answer
Chris Shaw
26,676 PointsHi David,
This challenge is slightly confusing as it doesn't explicitly say where to put the input
field but I think the teacher assumed the question would be self explanatory, the final code you want is the below.
<p>Hello, {{user.name}}</p>
<input type="text" ng-model="user.name" />
Happy coding!
David Keylock
1,899 PointsThat's great, many thanks Chris!
Gianni Zamora
9,547 PointsGianni Zamora
9,547 Pointsim having the sam problemo