Primeng p-radioButton - text as anchorHow to bind RadioButtons to an enum?radio button focused instead of the anchor element (IE9 issue)Radiobutton issue with Opera MiniHow to setup a RadioButton set within templates?How can I make Tcl/Tk buttons behave like radiobuttons?Radio button values in Python Tkinterlabel containing a-href-tag doesn't trigger it's inputIs it possible in android to put the drawableLeft image of radio button to the extreme left of the icon?Enlarge the radiobutton and checkbox bullet binding with Text sizeHow to pass the value of the button in the radiobutton on the second page

Planet that’s 90% water or more?

Does POSIX guarantee the paths to any standard utilities?

How does Harry wear the invisibility cloak?

What is this red bug infesting some trees in southern Germany?

Splitting polygons at narrowest part using R?

How will the UK Commons debate tonight despite the prorogation?

What exactly is a softlock?

Which is the best password hashing algorithm in .NET Core?

Is Levitate supposed to basically disable a melee based enemy?

Why don't they build airplanes from 3D printer plastic?

What did Boris Johnson mean when he said "extra 34 billion going into the NHS"

Powering an offset stacked array of pistons

Does immunity to damage from nonmagical attacks negate a rogue's Sneak Attack damage?

Generate points for smooth movement between two given points

The little bee buzzes around the flower garden

How do I stop making people jump at home and at work?

Do 643,000 Americans go bankrupt every year due to medical bills?

How does speed affect lift?

Why didn't Thatcher give Hong Kong to Taiwan?

To which airspace does the border of two adjacent airspaces belong to?

Can a country avoid prosecution for crimes against humanity by denying it happened?

Importance of electrolytic capacitor size

Did the US Climate Reference Network Show No New Warming Since 2005 in the US?

How do I make my fill-in-the-blank exercise more obvious?



Primeng p-radioButton - text as anchor


How to bind RadioButtons to an enum?radio button focused instead of the anchor element (IE9 issue)Radiobutton issue with Opera MiniHow to setup a RadioButton set within templates?How can I make Tcl/Tk buttons behave like radiobuttons?Radio button values in Python Tkinterlabel containing a-href-tag doesn't trigger it's inputIs it possible in android to put the drawableLeft image of radio button to the extreme left of the icon?Enlarge the radiobutton and checkbox bullet binding with Text sizeHow to pass the value of the button in the radiobutton on the second page






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















Is it possible to transform the text of a radio button to an anchor?



https://www.primefaces.org/primeng/#/radiobutton



In this case, Option 1 could be a link that the user clicks to open a new browser window to view the page.



This will not work:



 <p-radioButton name="operation_group" [(ngModel)]="modelcol" tabindex=2 inputId="opt1">
<a href="https://www.thesitewizard.com/">Operation</a> </p-radioButton>









share|improve this question
























  • Why are you use radio button if you want to open a link on click?

    – Zarna Borda
    Mar 28 at 3:30

















1















Is it possible to transform the text of a radio button to an anchor?



https://www.primefaces.org/primeng/#/radiobutton



In this case, Option 1 could be a link that the user clicks to open a new browser window to view the page.



This will not work:



 <p-radioButton name="operation_group" [(ngModel)]="modelcol" tabindex=2 inputId="opt1">
<a href="https://www.thesitewizard.com/">Operation</a> </p-radioButton>









share|improve this question
























  • Why are you use radio button if you want to open a link on click?

    – Zarna Borda
    Mar 28 at 3:30













1












1








1








Is it possible to transform the text of a radio button to an anchor?



https://www.primefaces.org/primeng/#/radiobutton



In this case, Option 1 could be a link that the user clicks to open a new browser window to view the page.



This will not work:



 <p-radioButton name="operation_group" [(ngModel)]="modelcol" tabindex=2 inputId="opt1">
<a href="https://www.thesitewizard.com/">Operation</a> </p-radioButton>









share|improve this question














Is it possible to transform the text of a radio button to an anchor?



https://www.primefaces.org/primeng/#/radiobutton



In this case, Option 1 could be a link that the user clicks to open a new browser window to view the page.



This will not work:



 <p-radioButton name="operation_group" [(ngModel)]="modelcol" tabindex=2 inputId="opt1">
<a href="https://www.thesitewizard.com/">Operation</a> </p-radioButton>






typescript radio-button primeng






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 28 at 3:12









dirtyw0lfdirtyw0lf

6203 gold badges11 silver badges39 bronze badges




6203 gold badges11 silver badges39 bronze badges















  • Why are you use radio button if you want to open a link on click?

    – Zarna Borda
    Mar 28 at 3:30

















  • Why are you use radio button if you want to open a link on click?

    – Zarna Borda
    Mar 28 at 3:30
















Why are you use radio button if you want to open a link on click?

– Zarna Borda
Mar 28 at 3:30





Why are you use radio button if you want to open a link on click?

– Zarna Borda
Mar 28 at 3:30












2 Answers
2






active

oldest

votes


















1
















There is no easy way to directly implement this in Primeng. But you need to do a trick for this. Might it would not be the best solution but it will serve your purpose. It is a workaround only.



Taking the example of Primeng Radio button.



I have added a custom class customeRadio in html and also added <a>tag in same as option value.



<div class="ui-g-12 customeRadio">
<p-radioButton name="group1" value="Option 1" label="Option 1" [(ngModel)]="val1" inputId="opt1">
</p-radioButton><a href="">Option 1</a>
</div>
<div class="ui-g-12 customeRadio">
<p-radioButton name="group1" value="Option 2" label="Option 2" [(ngModel)]="val1" inputId="opt2">
</p-radioButton><a href="">Option 2</a>
</div>
<div class="ui-g-12 customeRadio">
<p-radioButton name="group1" value="Option 3" label="Option 3" [(ngModel)]="val1" inputId="opt3">
</p-radioButton><a href="">Option 2</a>
</div>


Now in styles.css file or where where you want to write the css for it.



Just hide the all label content using css selector property:



.customeRadio label
display:none;



That's all !






share|improve this answer
































    1
















    No css needed, just set label to empty string and add the anchor.






    share|improve this answer



























      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389609%2fprimeng-p-radiobutton-text-as-anchor%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1
















      There is no easy way to directly implement this in Primeng. But you need to do a trick for this. Might it would not be the best solution but it will serve your purpose. It is a workaround only.



      Taking the example of Primeng Radio button.



      I have added a custom class customeRadio in html and also added <a>tag in same as option value.



      <div class="ui-g-12 customeRadio">
      <p-radioButton name="group1" value="Option 1" label="Option 1" [(ngModel)]="val1" inputId="opt1">
      </p-radioButton><a href="">Option 1</a>
      </div>
      <div class="ui-g-12 customeRadio">
      <p-radioButton name="group1" value="Option 2" label="Option 2" [(ngModel)]="val1" inputId="opt2">
      </p-radioButton><a href="">Option 2</a>
      </div>
      <div class="ui-g-12 customeRadio">
      <p-radioButton name="group1" value="Option 3" label="Option 3" [(ngModel)]="val1" inputId="opt3">
      </p-radioButton><a href="">Option 2</a>
      </div>


      Now in styles.css file or where where you want to write the css for it.



      Just hide the all label content using css selector property:



      .customeRadio label
      display:none;



      That's all !






      share|improve this answer





























        1
















        There is no easy way to directly implement this in Primeng. But you need to do a trick for this. Might it would not be the best solution but it will serve your purpose. It is a workaround only.



        Taking the example of Primeng Radio button.



        I have added a custom class customeRadio in html and also added <a>tag in same as option value.



        <div class="ui-g-12 customeRadio">
        <p-radioButton name="group1" value="Option 1" label="Option 1" [(ngModel)]="val1" inputId="opt1">
        </p-radioButton><a href="">Option 1</a>
        </div>
        <div class="ui-g-12 customeRadio">
        <p-radioButton name="group1" value="Option 2" label="Option 2" [(ngModel)]="val1" inputId="opt2">
        </p-radioButton><a href="">Option 2</a>
        </div>
        <div class="ui-g-12 customeRadio">
        <p-radioButton name="group1" value="Option 3" label="Option 3" [(ngModel)]="val1" inputId="opt3">
        </p-radioButton><a href="">Option 2</a>
        </div>


        Now in styles.css file or where where you want to write the css for it.



        Just hide the all label content using css selector property:



        .customeRadio label
        display:none;



        That's all !






        share|improve this answer



























          1














          1










          1









          There is no easy way to directly implement this in Primeng. But you need to do a trick for this. Might it would not be the best solution but it will serve your purpose. It is a workaround only.



          Taking the example of Primeng Radio button.



          I have added a custom class customeRadio in html and also added <a>tag in same as option value.



          <div class="ui-g-12 customeRadio">
          <p-radioButton name="group1" value="Option 1" label="Option 1" [(ngModel)]="val1" inputId="opt1">
          </p-radioButton><a href="">Option 1</a>
          </div>
          <div class="ui-g-12 customeRadio">
          <p-radioButton name="group1" value="Option 2" label="Option 2" [(ngModel)]="val1" inputId="opt2">
          </p-radioButton><a href="">Option 2</a>
          </div>
          <div class="ui-g-12 customeRadio">
          <p-radioButton name="group1" value="Option 3" label="Option 3" [(ngModel)]="val1" inputId="opt3">
          </p-radioButton><a href="">Option 2</a>
          </div>


          Now in styles.css file or where where you want to write the css for it.



          Just hide the all label content using css selector property:



          .customeRadio label
          display:none;



          That's all !






          share|improve this answer













          There is no easy way to directly implement this in Primeng. But you need to do a trick for this. Might it would not be the best solution but it will serve your purpose. It is a workaround only.



          Taking the example of Primeng Radio button.



          I have added a custom class customeRadio in html and also added <a>tag in same as option value.



          <div class="ui-g-12 customeRadio">
          <p-radioButton name="group1" value="Option 1" label="Option 1" [(ngModel)]="val1" inputId="opt1">
          </p-radioButton><a href="">Option 1</a>
          </div>
          <div class="ui-g-12 customeRadio">
          <p-radioButton name="group1" value="Option 2" label="Option 2" [(ngModel)]="val1" inputId="opt2">
          </p-radioButton><a href="">Option 2</a>
          </div>
          <div class="ui-g-12 customeRadio">
          <p-radioButton name="group1" value="Option 3" label="Option 3" [(ngModel)]="val1" inputId="opt3">
          </p-radioButton><a href="">Option 2</a>
          </div>


          Now in styles.css file or where where you want to write the css for it.



          Just hide the all label content using css selector property:



          .customeRadio label
          display:none;



          That's all !







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 28 at 12:00









          DirtyMindDirtyMind

          1,1469 silver badges26 bronze badges




          1,1469 silver badges26 bronze badges


























              1
















              No css needed, just set label to empty string and add the anchor.






              share|improve this answer





























                1
















                No css needed, just set label to empty string and add the anchor.






                share|improve this answer



























                  1














                  1










                  1









                  No css needed, just set label to empty string and add the anchor.






                  share|improve this answer













                  No css needed, just set label to empty string and add the anchor.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 31 at 4:57









                  dirtyw0lfdirtyw0lf

                  6203 gold badges11 silver badges39 bronze badges




                  6203 gold badges11 silver badges39 bronze badges






























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55389609%2fprimeng-p-radiobutton-text-as-anchor%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                      SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                      은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현