-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Trying to get my head around the different use cases folks have for deferred directive loading from this ticket.
At first read, I thought most folks were looking to delay the execution of a post-link function and controller associated with a directive until after some dependencies had resolved. I noticed angular-wait's slugline implies a focus on load state:
Angular directive for showing pending ("loading...") content
Another good use case.
I see it's transcluding content. When someone puts a directive inside <wait-done>, do you know which steps would be executed BEFORE the wait resolves? compile? controller? pre-link? post-link? I think it would do the compile but nothing else, right?
If all you need is deferred directive evaluation, a syntax that emphases the optional-ness and composability of the feature might be preferable:
<user-profile-form waits="user"></user-profile-form>
If the focus is on indicating load state, a syntax that emphasizes the either/or-ness of the situation may be better, like what you have now.
Anyway, sort of thinking out loud, but also trying to figure out how many of the steps in the compile process are possible to defer.