I am using angular js and mongoDB, In mongoDB I have some text with \n, So each line comes into the new line based on \n, But I am also want to add line number for each line.
HTML CODE
{{sorceText}}
Controller code
$scope.sorceText=" ANB+IO:UI+OPO++7866:1111222'\OKP+JJJJ+PP++IOOIO:9989+KKKKKK+II+22:33'
IIOI+IOIOOI+OOOO:13:1:IA+AA346+4'
MSG+8'
LLL+PLPL:MLML+52519950'
NBK+290818:0000+MJL+LKL+OK+91'
KWNN+250'
NFR'
KK+KK:MMM'"
Displaying Now:
ANB+IO:UI+OPO++7866:1111222'\OKP+JJJJ+PP++IOOIO:9989+KKKKKK+II+22:33'
IIOI+IOIOOI+OOOO:13:1:IA+AA346+4'
MSG+8'
LLL+PLPL:MLML+52519950'
NBK+290818:0000+MJL+LKL+OK+91'
KWNN+250'
NFR'
KK+KK:MMM'
Expected I want to be add line number of each line.
- ANB+IO:UI+OPO++7866:1111222'\OKP+JJJJ+PP++IOOIO:9989+KKKKKK+II+22:33'
- IIOI+IOIOOI+OOOO:13:1:IA+AA346+4'
- MSG+8'
- LLL+PLPL:MLML+52519950'
- NBK+290818:0000+MJL+LKL+OK+91'
- KWNN+250'
- NFR'
- KK+KK:MMM'
{{sourceText}}wrapped in? Apretag or something else? Basically you will need to split the string into the an array on the new line character. Then bind that to an appropriately styled list.