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 trialAmanda Olczak
4,124 PointsGetting the following error: angular.js:12416Error: [$parse:syntax] http://errors.angularjs.org/1.4.5/$parse/syntax?p0=%
from the angular.js file:
if (hasApply) {
return function() {
var args = [];
forEach(arguments, function(arg) {
args.push(formatError(arg));
});
return logFn.apply(console, args);
};
}
error is showing on the last line of text.
I've gone over my code, shown below, and I don't think that's the problem
// javascript - app.js// angular.module("todoListApp", []) .controller("mainCtrl", function($scope) { $scope.helloWorld = function() { console.log("Hello there! There is the helloWorld controller function, in the mainCtrl"); }; });
//html - index.html //
<!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"> <h1>My ToDos</h1> <div ng-controller="mainCtrl" class="list"> <input type="checkbox" /> <lable class="editing-lable">A Sample To Do</lable> <input type="text" class="editing-lable" /> <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>
Any ideas?
1 Answer
jag
18,266 Points<a href="" ng-click="<helloWorld()">save</a>
There is a < inside the ng-click attr.
Amanda Olczak
4,124 PointsThank you! Issue fixed!
Amanda Olczak
4,124 PointsAlso, how did you re-post the code in those nice boxes? When I posted my question I did not see how to do that.
jag
18,266 PointsYou can do multiple code boxes you can see the markdown cheatsheet. The way you do it is with three backticks (`) followed by html, js, css or other codes then closed by another three back ticks.
```[type of code]
`.`` Without the .
<!-- Like so -->
```html
`.``
jag
18,266 Pointsjag
18,266 PointsJust to clean it up.
Angularjs
app.js
index.html