nikestep / html-angular-validate

A HTML validator node module aimed at AngularJS projects
MIT License
14 stars 13 forks source link

HTML template pattern for legacy components #28

Closed jas1337 closed 6 years ago

jas1337 commented 6 years ago

Present pattern for finding templates in component is limited for back-ticks notation only:

template: `
        <div id="dvContainer" class="container top-level">
            <span class="label">Nothing Special Div Fragment</span>
            <div>
                <ul>
                    <li>Item One</li>
                    <li>Item Two</li>
                    <li>Item Three</li>
                </ul>
            </div>
        </div>
`

Many legacy components were using other template pattern using single quotation mark notation:

const template = ''
+'    <div id="dvContainer" class="container top-level">'
+'         <span class="label">Nothing Special Div Fragment</span>'
+'         <div>'
+'             <ul>'
+'                 <li>Item One</li>'
+'                 <li>Item Two</li>'
+'                 <li>Item Three</li>'
+'             </ul>'
+'         </div>'
+'     </div>';

It would be nice if templates could have both types of notation, using back-ticks and single quotation mark. Also, possibility for using colon or equal sign interchangeably would be an improvement.