Common errors in Angularjs

Source: Internet
Author: User

The use of Angularjs time is not very long, understanding is not thorough enough, but for beginners can still help point.

1. callback function ..... --and remember that it's asynchronous, and there's an inexplicable problem remember to check

2. Memory leaks ..... --many possibilities, this is still to be researched, I encountered the situation is to write a return value in the Ng-repeat function, and then he kept going to call this function, resulting in memory leaks, should write a ng-init= "function" before ng-repeat , and then put the return value into a scope scope variable, ng-repeat= "This variable", so it is resolved.

3. $http ... ---> is asynchronously transmitted via AJAX after the result into $scope, he automatically triggered a $apply () dirty check, and $.ajax need you to manually trigger.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Common errors in Angularjs

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.