I think the template needs to be built first before the map though, otherwise leaflet throws an error when it tries to find 'location-map'.