I have this AngularJS code sample that reads the HTML tag within the data and displays the content on the screen with the following message:
Hi Mike!
Good Morning!!!
I need to modify it so that the title or tooltip also shows the content in two separate lines, considering the br tag within the data. Currently, the title/tooltip displays as Hi Mike! <br/>
Good Morning!!! in a single line.
Here is the Sample Code:
<html ng-app> <head> <title>Sample</title> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.1.1/angular.js"
type="text/javascript">
<script type="text/javascript"> function SampleCtrl($scope) { $scope.message = "Hi Mike! <br/> Good Morning!!!" } </script> </head> <body> <div ng-controller="SampleCtrl"> <span title="{{message}}" ng-bind-html-unsafe="message"></span> </div> </body> </html>