Use JavaScript while in HTML

-6

I wanted to be able to use a while to see if the condition was made for yes, to create a input .

I just do not know how to use while in HTML. How would you do that? The part I'm wanting to have while inside an HTML is this:

    <script>
    while({{valor}}!=2){
        <div ng-controller="Teste2">
                Hello <input type="text" ng-model="user.name"/>
                <hr/>
                <h1>Hello {{user.name}}</h1>
        </div>
    }
    </script>

Without <script> , only the code is printed on the screen, and with <script> it does not work, what could it do?

    
asked by anonymous 19.12.2018 / 01:49

0 answers