can angularjs can be integrated into an existing html/css design or its not a good idea?

62 views
Skip to first unread message

gitted

unread,
Jun 20, 2014, 11:17:08 AM6/20/14
to ang...@googlegroups.com
Hi,

I'm excited about angular, and I have a basic understand of directives, modules, services, dependency injection etc.

From whatever little sample coding I did so far, it seems that angular is pretty unobtrusive i.e. if I want to sprinkle a little angular on a page I can do so without breaking my existing website.

If I have jquery and my own .js files + css, do you see any potential for conflicts?

Example:  Say I have a form in the middle of my page, can I angularize just that part of my html page or adding the ng-app directive will 100% change how the page renders now?

Thanks.

Billy Figueroa

unread,
Jun 21, 2014, 9:55:15 AM6/21/14
to ang...@googlegroups.com
Well when working with angular you should pretty much convert any jquery to angular as possible to ensure everything works as supposed. I just recently ported over a completely jquery and php application to angularjs and php.

Sometimes thinks didn't work as expected when I tried to keep some jquery code. I am not sure if it was an error on my part but I have converted prob like 95% of my jquery to be angular. In the case of forms you definately want to convert those to angular code. Angular sort of overrides a few html tags and the form tag is one of them so you will have to add angular logic (say in a controller) to handle the submit of the form. Your API calls won't change much but how you handle things on the client side will change

here is an example of this...

http://scotch.io/tutorials/javascript/submitting-ajax-forms-the-angularjs-way
Reply all
Reply to author
Forward
0 new messages