Apply css class from another page to title with angularjs
<p>I have a text input with a toggle button. I want to apply/remove a CSS <code>style:word-wrap: break-word;</code> to the <code>title</code> from <code>page 2</code>. How should I proceed?</p>

<p><strong>Page 1 :</strong> </p>

<pre><code>  &lt;h2&gt;Title&lt;/h2&gt;

  &lt;input ng-model="card.title"&gt;

  &lt;md-button ng-model="card.title" ng-click="toggleWrap()"&gt;
     &lt;md-icon&gt;{{(wrapText===true) ? 'wrap_text' : 'remove'}}&lt;/md-icon&gt;
  &lt;/md-button&gt;
</code></pre>

<p><strong>JS 1 :</strong>      </p>

<pre><code>  $scope.wrapText = true;
  $scope.toggleWrap = function() {
     $scope.wrapText = !$scope.wrapText;
  };
</code></pre>

<p><strong>Page 2 :</strong></p>

<pre><code>&lt;h2 ng-class="{'word-wrap': yesORno}"&gt;{{title}}&lt;/h2&gt;
</code></pre>