backbonejs + angularjs integration - angularjs

do you have any experience with integrating AngularJS component into existing BackboneJS application?
Could you just briefly give me some help, what should I do to make it work?
Thank you
Igor

I was able to make it work after all
for the future reference - this gist helped me a lot: https://gist.github.com/dgs700/6197687
anyway, Charles is right - it is definitely not nice to combine these two frameworks (in my case, it was not my call to do so...)

Angular scope will overcome the backbone scope. There is no point using those two frameworks on the same project. Mixing those two will result in a poor designed project.
Either stick to Backbone or replace it with Angular.

Related

Is zurb-foundation compatible with Angular JS?

I need to migrate an site from one framework to another because I need to use Angular JS.
I found zurb-foundation very interesting. It happens that it seems to use jQuery.
According to this website https://scotch.io/tutorials/how-to-correctly-use-bootstrapjs-and-angularjs-together
When building out Angular projects, you should not add on the full jQuery library. jQlite is already included in Angular and this should be all the jQuery that is necessary.
I had a bad experience running Bootstrap and Angular together and I don't want to repeat the same mistake.
It happens that I found the following line at zurb-foundation index.html
<script src="js/vendor/jquery.js"></script>
A quick search has shown that it seems to be a "simplified" version of jQuery (am I wrong?).
I've seem many people questioning things related to Angular in Foundation apps.
My question is: Is Angular compatible with Foundation?
While you'll read in many places that you should stay away from jQuery when using Angular, you'll also notice a subtle "at first" here and there. Angular is quite opinionated, and employs a declarative way of doing things, whereas jQuery is imperative. Check this out for more on the topic.
To answer your question:
Scotch.io's tutorial about Angular and Bootstrap involves UI Bootstrap, a library of directives written in Angular to be able to integrate common Bootstrap functionalities easier.
The equivalent of UI Bootstrap for Foundation is Angular Foundation. I recommend giving this thread a look-over as well, as it contains information that may be relevant to your use case.
So yes, Angular is compatible with Foundation. Happy hacking :)
a quick answer is of course they are compitable with each other. check this out from Zurb. However if you do not want to use JQuery, then the easiest way is to use pineconellc for foundation 5. foundation 6 does not have a port yet as far as I know.

Can angular and knockout be used in same web application?

I am learning Angular JS and Knockout JS. So usually during interviews I have encountered a question like,
Can we use both Angular JS and Knockout JS in the same application at a time.
Also what could be the disadvantages and advantages if we do that?
If we cannot use both frameworks in the same web application, what are the reasons.
Please help me out.
Yes you can ("But why would you? AngularJS already has data binding" would be my counter question)
Disadvantages
Devs must learn two frameworks.
As mentioned above, increased loading time.
Advantages
None that I can see.
See 1.

Specific suggestions on how to prepare for AngularJS 2.0?

I have an AngularJS 1.3 application that will I suppose eventually move to AngularJS 2.0. I've watched the videos from ng-europe and I understand there are many changes. As I expect development to continue with our AngularJS 1.3 code for the next 12 I would like to hear if anyone has any specific suggestions on preparing for 2.0.
My application is simple in that it creates no directives. In particular I would like to hear any tips on how I should go about creating controllers to get ready for them being very different in 2.0. Should I eliminate all references to scope in my controllers. Should I move everything to services?
I hope for some useful suggestions but of course specific ones so this question does not get closed.
Thanks
I think that so little has specifically been announced yet, and there's so much potential for it to change that it's a hard question to answer, e.g. check out this issue for an example of something quite fundamental that's likely to change since the ng-europe announcement.
Within my team we're trying to take the following approach:
Try not to use $scope (controller-as syntax).
Keep your controllers as light as possible by using directives to encapsulate UI functionality and services to deal with data models / API calls.
Use the new syntax for one-way binding where you don't need two-way binding. One-way binding will be the default for Angular 2.0.
Write some unit tests! It'll be much easier to do some significant refactoring if you have some confidence that your code will still work :).
Not only should that help with the move to 2.0 if / when that happens, but it should help your 1.3 apps too!

Angular Naming Convention

I'm currently learning Angular|AngularJS|Angular.js. I'm curious, is there an official name for this AWESOME framework? If so, what is it?
I see AngularJS used a lot with 'Angular' being the brevity option. However, I personally prefer Angular.js because I see projections like Angular.dart highlighting one of Angular's strong points.
In my mind, I view it as
Angular - The name of the framework (like .NET)
.[Language]
My opinions aside, I'm trying to learn if there's an 'official' name. Is it AngularJS or Angular.js?
Thank you!
According to Wikipedia it's AngularJS.
https://en.wikipedia.org/wiki/AngularJS

Pros and cons of using AngularJS + jQuery Mobile in one project

We're about to start a project using mentioned libraries. We have already used jQM in another project, but coupled with Backbone. Now we're thinking about using AngularJS with jQM. Do you think it's a good idea? And if not, why?
To elaborate, the question is whether it is advisable/recommended/easy/beneficial to use these libraries together, or maybe there is something that should prevent us from using them both in one project. We don't want to spend half of project's time on making them work together just on principle.
AngularJS and JQM do different things. AngularJS is MVC + Lot More. JQM on the other hand is for direct UI manipulation (lower level than Angular). The good news is AngularJS is flexible and will let you work with any other Javascript framework including JQM. The recommended way of using them together is use the adapter as mentioned above or create your own reusable directives that will add "JQM nature" to your views. For e.g. you can create a directive that will convert a standard UL to a fancier JQM list. The good thing about doing this in directives and not within your view is that your UI code is separated in separate modules and not intermingled with business logic.

Resources