1

I apologize if this is a duplicate. I see in some people's code, they have something like this:

<div ui-grid="myUIGrid" ui-grid-selection ui-grid-resize-columns class="grid" />

What is ui-grid-selection and ui-grid-resize-columns? I've never seen an attribute without an equals sign before. The sample code is using angular. Is it an angular thing?

user3685285
  • 6,066
  • 13
  • 54
  • 95
  • Those are boolean attributes. See [this question](http://stackoverflow.com/questions/21796217/are-attributes-without-value-allowed-in-html4). – andreas Feb 14 '17 at 18:36
  • This is not an angular thing. Your question is answered here [Are empty data attributes allowed](http://stackoverflow.com/questions/9729080/are-empty-html5-data-attributes-valid) – Aayush Gupta Feb 14 '17 at 18:39
  • Although all of these do happen to be for Angular, and Angular directives leverage it... – Dan Field Feb 14 '17 at 18:39

1 Answers1

2

Your mentioned attributes are marker attributes for angularJs Grid.

ui-grid-selection : Enable grid row selection

ui-grid-resize-columns : Enable column resize

These attributes will take effect after parsing of script.

Simple example of attribute without value is "disable". To disable element in html we can write either disable=disable Or simply "disable"

BSS
  • 76
  • 2