I've been reading Angular Tutorial. In the phones.json
file the first object is as:
{
"age": 0,
"id": "motorola-xoom-with-wi-fi",
"imageUrl": "img/phones/motorola-xoom-with-wi-fi.0.jpg",
"name": "Motorola XOOM\u2122 with Wi-Fi",
"snippet": "The Next, Next Generation\r\n\r\nExperience the future with Motorola XOOM with Wi-Fi, the world's first tablet powered by Android 3.0 (Honeycomb)."
}
In the snippet
property there are two newlines. So I expect the output to be printed with two newlines after the text The Next, Next Generation
. But insted of two newlines there are two whitespaces
shown. You can see the output here: http://angular.github.io/angular-phonecat/step-8/app/
Why aren't newlines printed in the output?
If the newlines cannot print in html then what is the purpose of
/r/n
in the json data?
P.S: I have no clue how my question is duplicate of the linked one.
`, ` – str Jul 18 '16 at 07:41