Reference from: https://toddmotto.com/all-about-angulars-emit-broadcast-on-publish-subscribing/ — Angular’s $emit, $broadcast and $on fall under the common “publish/subscribe” design pattern, or can do, in which you’d publish an event and subscribe/unsubscribe to it somewhere else. The Angular event system is brilliant, it makes things flawless and easy to do (as you’d expect!) but the concept […]

1,223 total views, 2 views today

Một trong những khó khăn cho những ai mới làm quen với AngularJS đó là vấn đề sử dụng new isolate/isolated scope (scope: {…}) của directive. Đối với vấn đề sử dụng loại {scope: true} hoặc {scope: false}, các bạn có thể đọc bài sau để hiểu rõ hơn: Understanding […]

1,306 total views, no views today

Reference from: https://github.com/angular/angular.js/wiki/Understanding-Scopes — Executive Summary: In AngularJS, a child scope normally prototypically inherits from its parent scope. One exception to this rule is a directive that uses scope: { … } — this creates an “isolate” scope that does not prototypically inherit.(and directive with transclusion) This construct is often used […]

1,427 total views, no views today