-1

I am trying to accesss into a rendered element from AngularJs. Basically I would like to do something like this:

app.js

(function() {
var app = angular.module('project', []);
**var data = '${renderedElement}';**

  app.controller('ProjectController', function(){
  .....
  });


})();

If I put this code directly into the html it works... but I would like to put it into a proper app.js.

Does someone have an idea??Thanks!

IrApp
  • 1,823
  • 5
  • 24
  • 42

1 Answers1

1

You mean you would like to access a rendered element in AngularJS? As far as I know you can use jQuery: http://makandracards.com/makandra/15851-angularjs-access-the-scope-for-a-rendered-dom-element

But you should be able to do this within AngularJS as well. An example to add a remove button inside a ng-repeat: Adding parameter to ng-click function inside ng-repeat doesn't seem to work

Community
  • 1
  • 1
Erik van de Ven
  • 4,747
  • 6
  • 38
  • 80