Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to intergrate WebViewJavascriptBridge with Angularjs or Ionic framework? #90

Closed
morer opened this issue Jul 11, 2014 · 7 comments

Comments

@morer
Copy link

morer commented Jul 11, 2014

Hey, I developed a app with Ionic Framework, and I want to bridge it to ios native code, is there a way to realize this? I write these codes and it does not work, can anyone help?
http://codepen.io/anon/pen/DkpKo (I include all the js file and tested on my ios simulator, with WebViewJavascriptBridge Example demo)

@marcuswestin
Copy link
Owner

This doesn't sound like a problem with wvjb, but maybe I can help anyway.

Exactly what is the problem you're seeing?

I'd suggest starting with just the example app. Then, add just one JavaScript file with "alert('hi')" in it, to ensure it's working. Once that's all good and working, start including the rest of your code.
-- while mobile

On Fri, Jul 11, 2014 at 5:44 AM, morer notifications@github.com wrote:

Hey, I developed a app with Ionic Framework, and I want to bridge it to ios native code, is there a way to realize this? I write these codes and it does not work, can anyone help?

http://codepen.io/anon/pen/DkpKo (I include all the js file and tested on my ios simulator, with WebViewJavascriptBridge Example demo)

Reply to this email directly or view it on GitHub:
#90

@morer
Copy link
Author

morer commented Jul 14, 2014

Hey, I started with wvjb example app, and it works well when alert('hi') without angularjs included, but when I included angularjs, and put it in angularjs controller, the alert('hi') just does not work, I'm not sure if angularjs could work together with wvjb, I'm not sure whether I could put angular module definition in connectWebViewJavascriptBridge, and if not, where should I define my angular module?
Thank you for your help.

@marcuswestin
Copy link
Owner

Then the problem does not sound like it is with wvjb, right?-- while mobile

On Sun, Jul 13, 2014 at 8:54 PM, morer notifications@github.com wrote:

Hey, I started with wvjb example app, and it works well when alert('hi') without angularjs included, but when I included angularjs, and put it in angularjs controller, the alert('hi') just does not work, I'm not sure if angularjs could work together with wvjb.

Reply to this email directly or view it on GitHub:
#90 (comment)

@marcuswestin
Copy link
Owner

Wvjb should work with any js, it makes no assumptions about the environment that should break with angularjs. Can you get your angularjs app to work on mobile at all?-- while mobile

On Sun, Jul 13, 2014 at 8:54 PM, morer notifications@github.com wrote:

Hey, I started with wvjb example app, and it works well when alert('hi') without angularjs included, but when I included angularjs, and put it in angularjs controller, the alert('hi') just does not work, I'm not sure if angularjs could work together with wvjb.

Reply to this email directly or view it on GitHub:
#90 (comment)

@morer
Copy link
Author

morer commented Jul 14, 2014

Yes, I found that angularjs does not work when html file loaded by UIWebView. But I still wonder who ever meet with this problem and solved it.

@marcuswestin
Copy link
Owner

Perhaps try something like https://github.com/lancevo/PhoneGap-AngularJS? I googled uiwebview angularjs and got some pretty relevant looking results.-- while mobile

On Sun, Jul 13, 2014 at 11:25 PM, morer notifications@github.com wrote:

Yes, I found that angularjs does not work when html file loaded by UIWebView. But I still wonder who ever meet with this problem and solved it.

Reply to this email directly or view it on GitHub:
#90 (comment)

@marcuswestin
Copy link
Owner

Closing, as there is no indication yet that this is a problem with WVJB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants