Skip to content

relative template paths #36

@juliangut

Description

@juliangut

Could it be possible to add a "relativeTo" or "fromPath" option in the same fashion as stripPathBefore but stripping the path UP TO that string?

having this structure where app and main are both modules

scripts
  |- app
  |    |- module.js
  |    |- views
  |         |- display.html
  |- main
  |    |- module.js
  |    |- views
  |         |- main.html
  |- app.js
  • using current stripPathBefore: "scripts/" I end up with "scripts/app/view/display.html" and "scripts/main/view/main.html" as template paths
  • using relativeTo: "scripts"/ I would end up with "app/view/display.html" and "main/view/main.html" as template paths which is far cleaner as "templateUrl" in module.js files (it would mean current_module/views/view_name.html)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions