Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
10
Reply
Error in angular2 component
Basavakumar Mudur
Nov 20 2016 12:35 AM
410
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();
}
}
Upload Source Code
Select only zip and rar file.
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