5

I tried Angular, and I liked it. I've began to integrate him into my rails-app, but then appeared some doubts about architecture

  1. Routes. I would like to navigate without refreshing the page, before i used Wiselinks gem, it's easy and cool - just install, patch link_to helper and done. But angular have his own router, and ui-router (which is cool). I want my app to be running at the browser like Opera Mini and IE, but ui-router doesn't have such callbacks as in wiselinks. I wouldn't create mobile site version - the design is adaptive yet. It means, I would use rails routing, but I want to AJAX page refreshing when it can be (progressive enchansement, yep). What do I do?

  2. In many places, the content is rendered by Angular, i.e. a list of posts (by ajaxing json). That fast & cool on desktop, but again old browsers! I need to render it on server for them. Or I haven't?

I'm stuck. Thanks.

3
  • I think you're good back to IE 7 if you follow a couple of rules about using shims docs.angularjs.org/guide/ie I don't believe there's anything you can do about IE 6, but I don't think it's a realistic concern. I've been using Angular for everything recently and had very little problems with regard to mobile vs desktop browsers (only ng-grid has some problems in opera on android) The only reason I see the need to render server side is SEO, which I haven't tackled yet personally but will involve PhantomJS I believe. Commented Aug 20, 2013 at 19:32
  • I just did a quick test on an iPod Touch 4th Gen version of Safari and on a Nexus 10 tablet, with Chrome and Dolphin and everything works fine (grid included, though my UI could use some cleanup for the small sizes) Not sure what you want regarding the callbacks Commented Aug 20, 2013 at 19:36
  • yeah, if you want to support old browsers, you shouldn't use angularJS . It still works if you support IE8+. Commented Aug 23, 2013 at 9:02

3 Answers 3

1

This would be best trip to angularjs + rails 4...

This post clear my doubts and now i m very clear about architecture, routes, controllers, model, etc..

http://www.honeybadger.io/blog/2013/12/11/beginners-guide-to-angular-js-rails

I hope this solves your DOUBTs

and to know further about angularjs visit

http://www.angularjs.org

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

Comments

0
  1. It's not necessary that you have to use angular routing. You can use ng-controller directive to inject controllers in your view.

  2. Angular in general is very fast. I have been using it even in mobile browsers, it works like a charm. True if do heavy $scope manipulation, things might get little slow.

  3. Talking about old browser support, till IE8, you are pretty good, if you follow http://docs.angularjs.org/guide/ie as already mentioned by shaunhusain, but below that I am skeptical.

1 Comment

So will an Angular app render correctly in opera mini? That browser is quite unlike a normal browser as it has no rendering engine, and does everything server side. I'm really curious if it would work at all...
0

I wouldnt recommend using wiselinks alongside with angular. We have tried that in a production app and it took us a long time to make this work, there had been so many issues with undead scopes and other artifacts.

Therefore, we have ended up throwing out wiselinks and replacing it with a similar directive written in angular. This way its easier to avoid problems when destroying or compiling dom.

Comments

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.