Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am trying to connect angularJS with another Java script framework - UI5. Scenario: I have a custom angular tag in my UI5 application. Change in UI5 must trigger the angularJS controller.

I am not getting how to keep the $apply/ $watch/ $broadcast outside of the controller/ directive and still communicate with rootScope.

I am looking for a basic code snippet to understand how to bridge two different java script frameworks.

share|improve this question

closed as off-topic by George Stocker Jun 23 at 20:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example." – George Stocker
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Can you provide some relevant code? –  Patrick Q Jun 23 at 19:55
add comment

1 Answer 1

up vote 0 down vote accepted

You can do this for rootScope:

<div id="appContainer" ng-app="myApp">

angular.element('#appContainer').scope()

And this for an element's scope (in this case, the scope defined by myController:

<div id="cont1" ng-controller="myController">

angular.element('#cont1').scope()
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.