javascript - how to read a text file and display it in html (angularjs) -
i using angularjs , have terms of use document in text file render html. recommendations on how read text file , display using html or display user? thanks
simplest way using ng-include
. if need use line breaks in text file within view wrap in <pre>
tag
<h3>terms</h3> <ng-include src="'terms.txt'"></ng-include>
or
<pre ng-include src="'terms.txt'"></pre>
Comments
Post a Comment