4 ms·
I had the same issue learning directives. In particular, I had a hard time getting "container" directives working right with isolated scope. I've come up with a
by yesimahuman 13y ago
I had the same issue learning directives. In particular, I had a hard time getting "container" directives working right with isolated scope. I've come up with a rule of thumb: if this directive is a small, self-contained widget, opt for isolated scope. If not, keep it simple and either not create any scope (for really basic wrapper directives), or create a new scope using the scope prototype chain.
But I still have a ton to learn, so I'm not sure that's the best approach.