Convert sidebar into Angular directive