You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using ASP.NET Core + Angular 2 template. The problem is with the TemplateURL which is not working with any URL. In my scenario I want to route it to the MVC controller and wanted to load the about page of Home controller.
Below is the exception.
Exception: Call to Node module failed with error: Error: No ResourceLoader implementation has been provided. Can't read the url "Home/About"
Here is my sample about.component.ts
import {Component} from '@angular/core';
import { platformUniversalDynamic } from 'angular2-universal'; @component({
selector: 'about',
templateUrl: 'Home/About'
})
export class AboutComponent {
message: string = 'Hello World';
Side notes:
I have also added the "angular2-template-loader" as dev dependency in package.json.
Hi,
I am using ASP.NET Core + Angular 2 template. The problem is with the TemplateURL which is not working with any URL. In my scenario I want to route it to the MVC controller and wanted to load the about page of Home controller.
Below is the exception.
Exception: Call to Node module failed with error: Error: No ResourceLoader implementation has been provided. Can't read the url "Home/About"
Here is my sample about.component.ts
import {Component} from '@angular/core';
import { platformUniversalDynamic } from 'angular2-universal';
@component({
selector: 'about',
templateUrl: 'Home/About'
})
export class AboutComponent {
message: string = 'Hello World';
Side notes:
module: {
loaders: [
{
test: /.ts$/,
loaders: ['awesome-typescript-loader', 'angular2-template-loader?keepUrl=true'],
exclude: [/.(spec|e2e).ts$/]
},
/* Embed files. /
{
test: /.(html|css)$/,
loader: 'raw-loader',
exclude: /.async.(html|css)$/
},
/ Async loading. */
{
test: /.async.(html|css)$/,
loaders: ['file?name=[name].[hash].[ext]', 'extract']
}
]
}
The text was updated successfully, but these errors were encountered: