Skip to content

Cryptic error when templateUrl is empty #3762

Closed
@ericmartinezr

Description

When trying to set up a plnkr for a skeleton with alpha35 I found out this. I searched before but I didn't find anything.

When leaving templateUrl empty throws this error

EXCEPTION: TypeError: Cannot read property '0' of undefined
angular2.dev.js:22367 STACKTRACE:
angular2.dev.js:22367 TypeError: Cannot read property '0' of undefined
    at _resolveUrl (https://code.angularjs.org/2.0.0-alpha.35/angular2.dev.js:15209:36)
    at execute.UrlResolver.resolve (https://code.angularjs.org/2.0.0-alpha.35/angular2.dev.js:15254:18)
    at execute.Compiler._buildRenderTemplate (https://code.angularjs.org/2.0.0-alpha.35/angular2.dev.js:29632:48)
    at execute.Compiler._compile (https://code.angularjs.org/2.0.0-alpha.35/angular2.dev.js:29536:37)
    at https://code.angularjs.org/2.0.0-alpha.35/angular2.dev.js:29578:39
    at Array.forEach (native)
    at https://code.angularjs.org/2.0.0-alpha.35/angular2.dev.js:29563:64
    at Array.forEach (native)
    at execute.Compiler._compileNestedProtoViews (https://code.angularjs.org/2.0.0-alpha.35/angular2.dev.js:29562:25)
    at https://code.angularjs.org/2.0.0-alpha.35/angular2.dev.js:29500:27

Here's a plnkr.

I found a similar issue, but it's about setting a non-url.

A useful message could be : templateUrl must not be empty. That simple, I think.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions