Interested in learning @reactjs? Check out ReactWeek.com. A week long workshop focused on learning React taught by @ryanflorence.
With the exception of isolate scopes, all scopes are created with prototypal inheritance, meaning they have access to their parent scopes.
My blog post on the differences between Factories, Services, and Providers in AngularJS. goo.gl/NozeGf
The link function is invoked AFTER the compiled template, so do DOM manipulation, event listeners, and data change 'watchers' here.
In Angular, the default headers sent for every request live in in the $httpProvider.defaults.headers.common object. #angularjs
Although tempting, try to not use $watch in a controller. It makes it difficult to test. #angularjs
The "then" method returns a new promise after the initial promise is resolved. This gives you the ability to chain your promises #angularjs
Because directives can require the controller of another directive, ctrls are a great place to put actions used in more than 1 directive.
The main use case for Isolate Scopes are for reusable widgets that can be shared & used in unexpected contexts wo/ polluting other scopes.
When you handle an event manually, use a 3rd party framework, or call setTimeout, you'll want to use $apply to rerun the digest loop.
In AngularJS, after a template has been fetched (using AJAX), Angular caches it in the $templateCache service.
Dirty checking checks whether a value has changed that hasn't yet been synchronized across the application. #angularjs #javascript
With a directive use an Ele. if you encapsulate a self-contained piece of functionality. Use an Attr when decorating existing element.
The $evalAsync method is a way to schedule running expressions on the current scope at some time in the future.
A directive is just a function that can run on a particular DOM element. The function is expected to provide extra functionality on an elem.
$scope.$apply() is a way to gain access to the Angular context from outside of it. #angularjs #JavaScript
United States 趨勢
- 1. #DWTS 3,098 posts
- 2. Virginia 243K posts
- 3. Louisville 82.2K posts
- 4. Abigail Spanberger 26K posts
- 5. Jets 134K posts
- 6. Flav 1,147 posts
- 7. MD-11 18K posts
- 8. Jay Jones 29.1K posts
- 9. Honolulu 8,407 posts
- 10. #OlandriaxGlamourWOTY 2,565 posts
- 11. Jared 27.5K posts
- 12. UPS Flight 2976 15.8K posts
- 13. #AreYouSure2 49.4K posts
- 14. Miyares 15.5K posts
- 15. Brandon Ingram 1,867 posts
- 16. Azzi 7,450 posts
- 17. Colts 65.2K posts
- 18. #LHHMIA N/A
- 19. #いい推しの日 821K posts
- 20. Carrie Ann N/A
Something went wrong.
Something went wrong.