Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
10
Reply
Error in angular2 component
Basavakumar Mudur
7 years ago
421
Reply
I am using TemplateUrl in component but its not working its showing below error
Error: Uncaught (in promise): Failed to load http://localhost:3000/dist/app.component.html
my code like that in component
import { Component } from '@angular/core';
import { myService } from './myService';
@Component({
moduleId: module.id,
selector: 'app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
providers: [myService]
})
export class AppComponent {
title:string = "God's of God - Mahadeva!";
myDetails = [];
constructor(myService: myService) {
this.myDetails= myService.getDetails();
}
}
Post
Reset
Cancel
Answers (
10
)
Next Recommended Forum
What is the difference between Angular.js & KendoUI ?
Rendering the Partial View inside the div using Angular Js