0

I just finished reading documentation and watching numerous angularjs videos and decided to start working with it.

I decided to start with a small simple example and after fiddling for an hour and not being able to get it off the ground I am starting to wonder if it is me or something undetected after all..

SO my simple code started getting reduced and eventually I simply copied and pasted this fiddle code to see if that would work (since it works on jsfiddle.

http://jsfiddle.net/FssbL/1/

The code in my browser does not work...

I even reduced it to less code

my tad.js file contains this code

angular.module('myApp', [])

.controller('FirstCtrl', function($scope) {
    $scope.data = {message: "Hello"};
});

My html file contains this

<!DOCTYPE HTML>
<meta charset="UTF-8">

<head>
 <script src="js/angular.min.js"></script>
 <script src="js/tad.js"></script>
</head>

<html>

<body>

<div ng-app="myApp">
    <div ng-controller="FirstCtrl">   

        <h1> {{data.message + " world"}} </h1>

    </div>
</div>

</body>

</html>

Any help would be appreciated.

Thanks!

3
  • Your fiddle works for me! :) Commented Nov 8, 2013 at 23:53
  • I've copy and pasted your code form this question (together with angular.min.js from angularjs.org), and it works fine Commented Nov 8, 2013 at 23:54
  • ohhh gosh! I apologize profusely! I had a tad.js file loading from js directory but the one I was editing was in the root... lesson learned... check if the source files ARE the right files! Commented Nov 8, 2013 at 23:58

1 Answer 1

1

I had a tad.js file loading from js directory but the one I was editing was in the root... lesson learned... check if the source files ARE the right files!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.