Skip to content

Failed to load template #150

@thejourneydude

Description

@thejourneydude

I have the following file structure

assets
    - javascripts
        - angular
            - test
                - user.component.js
    - templates
        - test.html

In my user.component.js file, I have

templateUrl: 'test.html'

When I load the page, I receive the following error:

Error: [$compile:tpload] Failed to load template: templates/test.html (HTTP status: 404 Not Found)

I have user.component.js loaded and running on a HTML page. If I replace templateUrl with template: '<h1>Hello</h1>' then everything works just fine.

I have the following relevant gems:

  • Rails 4.2.6
  • Sprockets 3.6
  • Angular Rails Template 1.0.2

What's wrong and how do I fix this?

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