2

The angularjs FAQ has the following:

Can I use the open-source Closure Library with Angular?

Yes, you can use widgets from the Closure Library in Angular.

However, I could not find any examples.

Is there some example code somewhere, or a demo showing how to use two frameworks together?

2 Answers 2

1

What exactly would you like to see there? I wouldn't expect any kinds of problems with integration, unless there are some components in Closure which do the ui-model binding themselves. Then you might get into troubles if two frameworks are trying to do the same.

However, I really think this should be pretty straightforward. Just try it out! Create a simple Angular controller, which will create some widgets using Closure. Should be an easy task.

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

1 Comment

I guess I got nervous when I seen that angular-dojo required some additional script to pull the two frameworks together.
1

On my project we use Angular and Closure together. I'm not sure what you mean by "widgets" in the Closure library, as the Closure library provides more base level functionality such as goog.math and goog.i18n. You have to build your own UI components. If you're running your JavaScript through the Closure compiler, you'll just have a normal Angular app but with the ability to goog.include anything you need from Closure, such as the cross-browser goog.array.reduce or whatever you need. Just be sure to turn off all the Closure compiler optimizations (i.e. obfuscation) as it prevents Angular from finding its controllers and directives.

1 Comment

+ you can't use closures templating which is a massive downside to angular for us.

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.