Objective: I have a long text stored in a variable that I need to display as a text in a button. Since it is a long text, I wish to wrap it.
Example:
say the variable is $scope.buttonText, containg a long text(say 100 characters).
The button code (angular material is used) in the view is:
<md-button ng-click="someFunc()" style="width:300px;">
{{buttonText}}
</md-button>
The Expected Output is that the text in the button should wrap after 300px.
But the actual output of the above code is that the text is not wrapping after 300px. It just goes on and breaks the button. The spilled out text gets hidden.
Now, I have tried using the some CSS properties on it like white-space: normal; but it does not seem t work on the text at all.
I assume this is because the text is actually as a $scope variable.
Can someone help me in wrapping up the text in the button, which has a fixed width of 300px? Height is no issue.
A PLUNKR to regenerate the problem. please someone suggest changes.