Use angalurJS but do not want to use the route command.

Source: Internet
Author: User
Tags codeigniter
Currently, there is a running project. The backend is written by phpcodeigniter and many route-views are defined. Then, the data on the page is interactive and displayed through ajax written by jquery. Now I want to add a relatively independent function. I don't want to write it again with jquery. I used angalur and sent it... currently, there is a running project. The backend is written by php codeigniter and many route-views are defined. Then, the data on the page is interacted and displayed through ajax writing by jquery. Now I want to add a relatively independent function. I don't want to write it again with jquery. I used angalur and found it useful. if I continue to use the CI route, I don't need angular route, use angular as a jquery upgrade. Is there any problem? Do you have any precautions? No single page up, no need to use the when in angalur config to control the route, but use the controller in CI to control the page. Is someone using this? Is it very earthy?

Reply content:

Currently, there is a running project. The backend is written by php codeigniter and many route-views are defined. Then, the data on the page is interacted and displayed through ajax writing by jquery. Now I want to add a relatively independent function. I don't want to write it again with jquery. I used angalur and found it useful. if I continue to use the CI route, I don't need angular route, use angular as a jquery upgrade. Is there any problem? Do you have any precautions? No single page up, no need to use the when in angalur config to control the route, but use the controller in CI to control the page. Is someone using this? Is it very earthy?

I use both of them in combination, and there is nothing to do with it. It is based entirely on the needs of the page.

I am classified as follows:

  • For introduction pages or simple pages, add Angular in the form of output pages to do some quick operations. For example, the account settings page and password retrieval are relatively independent pages.
  • Angular routing is required for real App-type (which can be understood as a single page with complicated business functions) pages. The backend can be directed to a controller to output the basic page. Angular will render the Page Based on the route.
  • For error pages, 404 pages, and simple single pages, nothing is used. Speed of impact.

  1. Writing code is not intended to write code that is "unearth"
  2. Investigate what angularJS does: large-scale complex page logic, public interaction components, etc. Then, we should investigate at least two to three databases in similar locations (knockout/backbone. marionette) that are common in the industry)
  3. It is clear that the project requires angularJS (instead of playing handsome)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.