Open markwpearce opened 10 years ago
Here's the example code you can add to the gh-pages:
<h3> <a name="html-bind" class="anchor" href="#html-bind"><span class="octicon octicon-link"></span></a>HTML Bind</h3>
<div class="highlight highlight-html"><pre><span class="nt"><toggle-switch</span>
<span class="na">model=</span><span class="s">"switchStatus"</span>
<span class="na">html=</span><span class="s">"true"</span>
<span class="na">knob-label=</span><span class="s">"<strong>##</strong>"</span>
<span class="na">on-label=</span><span class="s">"<em>Puppies!</em>"</span>
<span class="na">off-label=</span><span class="s">"<del>Puppies</del>"</span><span class="nt">></span>
<span class="nt"><toggle-switch></span>
</pre></div>
<toggle-switch model="switchState" html="true" knob-label="<strong>##</strong>" on-label="<em>Puppies!</em>" off-label="<del>Puppies</del>"></toggle-switch>
Does ngSanitize have a angular version requirement?
It's a standard angular module.
https://docs.angularjs.org/api/ngSanitize
I'm not sure what Angular version it was introduced in.
On May 15, 2014, at 5:23 PM, Christopher Garvis notifications@github.com wrote:
Does ngSanitize have a angular version requirement?
— Reply to this email directly or view it on GitHub.
I see docs for it in 1.0.8. Not much there but looks like it should be good.
Did you want me to update the branch with the dependency set to version 1.0.8?
I don't mean to bother, but when do you think this will be pulled in?
Could this be made simpler with two different templates?
On Mon, May 26, 2014 at 10:51 AM, Mark Pearce notifications@github.com wrote:
I don't mean to bother, but do you think this will be pulled in?
Reply to this email directly or view it on GitHub: https://github.com/cgarvis/angular-toggle-switch/pull/27#issuecomment-44195574
The issue I ran into is that the existing tests expect the new (generated by the directive) HTML to be child nodes of the actual
Also, this makes it so we don't duplicate any code around the class names or ng-class calls.
Any update on this pull request ?
I actually switched to using https://github.com/JumpLink/angular-toggle-switch
It has html binding for labels an a more bootstrap 3-like styling, too
On Sep 30, 2014, at 6:40 AM, jmaynier notifications@github.com wrote:
Any update on this pull request ?
— Reply to this email directly or view it on GitHub.
Thanks @markwpearce, I will try it.
I added the ability to use "ng-bind-html" for the labels on the toggle switch. In order to do this, it now requires ngSanitize.
To make the switch use html binding, simply add a "html" attribute to the switch: