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

Got the correct output, but there is still Bummer showed

Hello guys,

In this challenge, I got the correct output, but still Bummer showed like this:

Bummer! Your double-brackets in the <p> element need to output the user.name property.

Thank you for your help!

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

  <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',[])
.controller('stageTwoControl', function($scope){
  $scope.user = {
    name:"sarah",
    email:"xx@gmail.com"
  };
});

2 Answers

Chris Shaw
Chris Shaw
26,676 Points

Hi mavis yc,

While you may have achieved the correct result outside of the challenge it's not expecting string concatenation, instead it's expecting for you to use Angulars template system to print the property name in the user object after the world Hello.

See the below.

<p>Hello {{user.name}}</p>

Happy coding!

Thank you so much! Chris Upjohn