<html> <head> <title></title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.js"></script> </head> <body> <div id="ajax-content-here"> </div> </body> </html>
I am really new to angular, so please be careful!
So the idea is as indicated in the header above. I load my page using the angular library included in the chapter section. Later I load the data (below) into a div container using ajax (jquery).
<div id="angular-test"> <div> <label>Name:</label> <input type="text" ng-model="yourName" placeholder="Enter a name here"> <hr> <h1>Hello {{yourName}}!</h1> </div> </div>
I would like to somehow initialize angular to only be active inside the #angular-test container after the ajax request has completed. I assume this has something to do with the scope object?
Thanks!
jquery angularjs angularjs-scope
Krabats
source share