put path logic code in angular config block