Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upfeat(compile): add human readable alternative to '@=&?' #9137
Conversation
|
it looks alright to me, I think we do need another core team opinion on this though --- @tbosch wdyt? |
| expect(componentScope.optRefAlias).toBe(componentScope.optRef); | ||
| expect(componentScope.optRefAlias).toBe(undefined); | ||
| expect(componentScope.optRefVerbose).toBe(undefined); | ||
| expect(componentScope.optRefAliasVerbose).toBe(undefined); | ||
|
|
This comment has been minimized.
This comment has been minimized.
gkalpak
Sep 17, 2014
Member
The above 4 checks are incorrect (not just the new "verbose" ones, but the old ones as well).
We are checking against componentScope.optRef[XYZ], but they will always be undefined, because there are no such properties on componentScope.
We should be checking against componentScope.optref[XYZ] (notice the lowercase r), because these are the properties that will eventually get values, so these are the ones we want to ensure are undefined before $rootScope.name gets a value assigned.
(The rest of the it block uses optref[XYZ] correctly.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
rcollette
commented on 808380d
Sep 17, 2014
|
How about ^ for the parent controller? |
This comment has been minimized.
This comment has been minimized.
|
let's first agree on the general idea, then we can think where else we can use this methodology |
|
@tbosch thoughts? I like the syntax better, but idk if it's really worth changing Angular 1.x to have yet another way to do this... |
|
agree that having multiple ways to do it kind of sucks, but if we're going to do it, then this doesn't look like a bad way |
|
Just talked to @IgorMinar, for now we don't do this as it adds another way to do the same thing. Would need to keep both in sync, update the style guide, ... But we should document why we use those symbols
|
|
@shahata Could you create a docs PR instead with these explanations? |
e8dc429
to
e83fab9
|
@shahata ping --- did you ever submit docs PRs about this? Someone on the IRC channel was saying we really need better docs/more examples for the isolate scope variable symbols. |
|
Sorry, somehow missed this one. I have to say that the reasoning behind the symbols doesn't make it any easier to understand imo. Even for me it sounds a bit strange:
I think we'd better close this unless someone has a good suggestion regarding how the docs can be improved. |
googlebot
commented
Dec 13, 2014
|
CLAs look good, thanks! |
|
Based on #9137 (comment), this is not going to land |
rcollette
commented
Jan 2, 2015
|
What a shame this was dismissed. When you read blogs, instructional videos,etc this is commonly discussed as a pain point. Keeping documentation up to date is a lame excuse for not implementing a small but helpful bit of code. I sense that fragile egos related to the original design are more the issue. Not one reason was presented for using symbology here and not elsewhere in angular, yet were going to hold on to it. |
|
@rcollette please keep the conversation technical and follow the code of conduct |
rcollette
commented
Jan 2, 2015
|
My apologies |
shahata commentedSep 17, 2014
support using
interpolate:<name>,bind:<name>,eval:<name>andbind:optional:<name>instead of@<name>,=<name>,&<name>and=?<name>Closes #9125