Home  >  Article  >  Backend Development  >  javascript - Is there a problem in jumping to the previous level in angular?

javascript - Is there a problem in jumping to the previous level in angular?

WBOY
WBOYOriginal
2016-09-21 14:13:121181browse

1. There is a col data table, which has 3 fields, one is name, the other is own id, and the third is husband id.
As follows: The horizontal bar s indicates that it is a child of certain data.

<code>{'a','3','2'}
{'a-s','4','3'}
{'a-s','5','3'}
{'a-s-s','6','5'}
{'a-s-s','7','4'}
{'b','8','2'}
</code>

Now if I retrieve the child item through the parent id, I don’t know why I can’t go back to the parent item from the child item.
The general idea is that I obtained a string of data corresponding to son (such as ‘a-s’) through the id (3) in a. The data corresponding to son contains the record parent id (3). I use this parent id (3) to find the pid (2) with id=3 in the database, and then return the son data (a and b) with the parent id of 2.
But for some reason it seems that if there are too many levels, it will get messy.

Reply content:

1. There is a col data table, which has 3 fields, one is name, the other is own id, and the third is husband id.
As follows: The horizontal bar s indicates that it is a child of certain data.

<code>{'a','3','2'}
{'a-s','4','3'}
{'a-s','5','3'}
{'a-s-s','6','5'}
{'a-s-s','7','4'}
{'b','8','2'}
</code>

Now if I retrieve the child item through the parent id, I don’t know why I can’t go back to the parent item from the child item.
The general idea is that I obtained a string of data corresponding to son (such as ‘a-s’) through the id (3) in a. The data corresponding to son contains the record parent id (3). I use this parent id (3) to find the pid (2) with id=3 in the database, and then return the son data (a and b) with the parent id of 2.
But for some reason it seems that if there are too many levels, it will get messy.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn