Trying to implement multiple <input /> fields, that populate <div> elements with the text entered. After those are implemented, I want to implement a set of <input class="checkbox"> that when clicked will wrap the input text in additional text, depending on the checkbox selected.
The problem is the 1st checkbox is bound to the second checkbox. How do I separate the model associated with each checkbox?
I am currently using ng-switch-when and trying to set the values in the controller, but it's failing to bind separately as per the plunkr
<div class="code alert-box warning" ng-switch on="TrackingCode.AddOnClick">
<div ng-switch-when="true">
<!-- code to render when AddOnClick checkbox is checked-->
<code>
onclick="_gaq.push(['_trackEvent({{category}}', '{{action}}', '{{label}}', '{{value}}', '{{nonInteraction}}']);"
</code>
</div>
<div ng-switch-when="test">
<!-- code to render when Something Else checkbox is checked-->
<code>
SomethingElse="_gaq.push(['_trackEvent({{category}}', '{{action}}', '{{label}}', '{{value}}', '{{nonInteraction}}']);"
</code>
</div>
<div ng-switch-default>
<!-- code to render when AddOnClick checkbox is un-checked -->
<code>
_gaq.push(['_trackEvent', '{{category}}', '{{action}}', '{{label}}', '{{value}}', '{{nonInteraction}}']);
</code>
</div>
</div>