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 AngularJS An Introduction to Two-Way Data Binding ng-model

Jamie Barton
Jamie Barton
14,498 Points

There is no input field for Challenge Task 2 of 2 in AngularJS Two-Way Data Binding.

Use ng-model to connect the input field to the property displayed in the paragraph tag.

There is no input field.

index.html
<!DOCTYPE html>
<html ng-app="myApp">
<head>
  <title>Angular.js</title>
</head>
<body>

  <script src="js/angular.js"></script>
  <script src="app.js"></script>
  <p>Hello {{user.name}}</p>
</body>
</html>
app.js
var myApp = angular.module('myApp',[]);

4 Answers

Hi Jamie,

You actually have to add both the input tag and the p tag yourself.

Jamie Barton
Jamie Barton
14,498 Points

I appreciate that but the quality of the question is a bit poor explaining this in my opinion. I did this myself but others learning might complain about this too. So I wanted to be the first.

Oh I see what you mean. Thanks for bringing this up

Sean Smith
Sean Smith
7,287 Points

I agree with Jamie. It was a little confusing, but this thread definitely helped. Thanks!

I concur.. it was a bit vague and took a few attempts to decipher what I was being asked to produce.

Marc-Oliver Gern
Marc-Oliver Gern
8,747 Points

I agree. The references to specific videos -and/or- code snippets could be improved. Same with the next code challenge. I am more or less a beginner and this tut seems more for JS experts who know the syntax of the language already.

Santiago Blanco
Santiago Blanco
2,939 Points

I pass this test.

            <input ng-model="user.name">