Henk van der Geld
Henk van der Geld

Reputation: 1

Double curly braces are rendered in page and are not replaced by bound value

I'm new to AngularJS and I'm playing with an example in VS2012. I have the following html.

Name:
<br/>
<input type="text" data-ng-model="name"/> {{name}}
<script data-ng-src="Scripts/angular.min.js"></script>

When running this, the curly braces with expression ({{ name }} are displayed on the page, this should not happen. When I type a name, the curly braces are not replaced with the value for name. What's the mistake that I make?

Upvotes: 0

Views: 415

Answers (1)

Kalhan.Toress
Kalhan.Toress

Reputation: 21901

initialize the app as a angular app

to do that

customize html tag as below

<html ng-app>

and remove data-ng-src and add src only

 <script src="Scripts/angular.min.js"></script>

Upvotes: 3

Related Questions