function createItem(device) {
        var id = calculateId(device)
        var item = builder.build()

        item.id = id
        item.setAttribute('ng-show', true)
        builder.update(item, device)
        mapping[id] = device

        return item
      }
// the first time we see the device.
the first time we see the device.
the first time we see the device .
function createItem(device) {
        var id = calculateId(device)
        var item = builder.build()
        item.id = id
        item.setAttribute('ng-show', true)
        builder.update(item, device)
        mapping[id] = device
        return item
      }
function createItem ( device ) { var id = calculateId ( device ) var item = builder . build ( ) item . id = id item . setAttribute ( 'ng-show' , true ) builder . update ( item , device ) mapping [ id ] = device return item }
the first time we see the device.
the first time we see the device .