0

I have an existing project on jquery 1.9 with my custom routing through hashing in the url and loading the respective pages on hashchange event & jquery.load() function. If I want to introduce Angular.js into a single html page which I was loading through jquery.load function, The single html file contains angular script, my controllers, and required css for that page. I was searching in the google for multiple ways to bootstrap angular in dynamic way, But I was failing to make it work.

Can anybody please help me how to initiate angular js application for only one page.

Thanks, Sampat

Sampat
  • 304
  • 2
  • 5
  • 13
  • Putting angular on top of jQuery app is terrible approach. Do a re-write . See : [thinking-in-angularjs-if-i-have-a-jquery-background](http://stackoverflow.com/questions/14994391/thinking-in-angularjs-if-i-have-a-jquery-background) – charlietfl Oct 08 '16 at 14:07
  • We are developing the jQuery project since 2.5 years and it is in active development. We just want to enable angular to only a single page. We have work in progress for other pages also. So, we are creating a seperate html page with same look and feel with angular for only that page. – Sampat Oct 08 '16 at 14:13
  • So create that page from scratch using angular. Beyond that your question is far too broad. You can manually bootstrap angular though – charlietfl Oct 08 '16 at 14:14
  • I am already creating a separate page to work only with angular. I just want how to write an angular application for a single html file which was loaded dynamically using jquery.load method. Building from scratch is a tough task at present. Because We need to rework all the other modules which was written using plain javascript & jquery. – Sampat Oct 09 '16 at 03:13
  • 2
    read up on how to manually bootstrap angular. Whole idea seems very backwards – charlietfl Oct 09 '16 at 03:18
  • 1
    https://docs.angularjs.org/api/ng/function/angular.bootstrap – charlietfl Oct 09 '16 at 03:19
  • Thanks for the source, I implemented it in my application. It is working fine. Thanks for your help @charlietfl. Yeah I too agree, this idea seems very backwards. But due to lack of developers in the team we are making one module dynamic. – Sampat Oct 09 '16 at 04:20

0 Answers0