1

There must be something else I need to do here, but I'm not sure what.

<div ng-app="theApp">
    <p> 1 + 2 = {{ 1 + 2}} </p>
</div>

var theApp = angular.module("theApp", []);

With AngularJS 1.2 added is giving:

1 + 2 = {{ 1 + 2 }}

If I remove the ng-app attribute, then it gives the expected result.

http://jsfiddle.net/abalter/yvh0e7vL/

enter image description here

1

2 Answers 2

1

Your angular module code needs to be accessible outside of any dom loading event that is set by default in jsfiddle

Just select No wrap in head from top left dropdown instead of the default ondomReady

DEMO

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

Comments

1

Change

<div ng-app="theApp">

to

 <div ng-app="">

1 Comment

But my next step is to actually have an app.

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.