* Register function to be used by the contained MatSortables. Adds the MatSortable to the * collection of MatSortables.
(sortable: MatSortable)
| 136 | * collection of MatSortables. |
| 137 | */ |
| 138 | register(sortable: MatSortable): void { |
| 139 | if (typeof ngDevMode === 'undefined' || ngDevMode) { |
| 140 | if (!sortable.id) { |
| 141 | throw getSortHeaderMissingIdError(); |
| 142 | } |
| 143 | |
| 144 | if (this.sortables.has(sortable.id)) { |
| 145 | throw getSortDuplicateSortableIdError(sortable.id); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | this.sortables.set(sortable.id, sortable); |
| 150 | } |
| 151 | |
| 152 | /** |
| 153 | * Unregister function to be used by the contained MatSortables. Removes the MatSortable from the |
no test coverage detected