-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(schematics): tree schematic not working #12281
fix(schematics): tree schematic not working #12281
Conversation
return node.expandable; | ||
}; | ||
|
||
/** Get whether the node has children or not. */ | ||
hasChild(index: number, node: FlatTreeNode){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have a space before {
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Note that I just moved that already existing code one block up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM aside from that one space, add merge-ready when ready
* Fixes that the new `tree` schematic is not working when added to an Angular app. Since one `FileNode` does not have the required `type` property, the TS compiler will complain about wrongly assigning the example data to the `DataSource`.
45e067f
to
b700c4e
Compare
@jelbourn Done. I think it should be |
Ah, yeah then. For some reason I thought it had been there for a while. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes that the new
tree
schematic is not working when added to an Angular app. Since oneFileNode
does not have the requiredtype
property, the TS compiler will complain about wrongly assigning the example data to theDataSource
.Also makes it more obvious what
interface
is doing. Right now, at first glance, I was pretty much confused byTreeNode
andFileNode
and what the flattener is actually doing.It should be a easy-to-use and easy-to-understand quick-start schematic.
Actual error in a new NG app