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!

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 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">
  <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">
<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()">
    <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>

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

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