Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript AngularJS Basics (1.x) Using Angular's Built In Directives Adding Data To Your App Using ng-model

Ng-directive not working?

I have been trying to get Angular to work on my computer without the need of Treehouse's workspaces for some time now and it's not working!

I also got the idea that it might work in localhost, and ng-inspector did work! Although, when I run my script the ng-model directive does nothing at all. I tried to do the example that Huston wrote in the video, but it just won't work!

<!doctype html>
<html lang="en">
<head>
  <title></title>
  <link href='https://fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'>
  <link href='styles/main.css' rel='stylesheet' type="text/css">
</head>
<body ng-app="todoListApp">

  <div ng-controller="mainCtrl" class="list">
    <h1 ng-click="helloWorld()">My TODOs</h1>
    <input ng-model="todo.completed" type="checkbox"/>
    <label class="editing-label" ng-click="helloWorld()">
      {{todo.name}}</label>
    <input ng-model="todo.name" class="editing-label" type="text"/>
    <div class="actions">
      <a href="">Edit</a>
      <a href="" ng-click="helloWorld()">Save</a>
      <a href="" class="Delete">delete</a>
    </div>
  </div>

  <script src="vendor/angular.js" type="text/javascript"></script>
  <script src="scripts/app.js" type="text/javascript"></script>
</body>
</html>

I also made sure it wasn't the angular script by testing it with a console.log on a ng-click directive explained on the video https://teamtreehouse.com/library/creating-a-controller-2

Any suggestions? Thanks in advance