Har devgun Har devgun - 1 year ago 115
TypeScript Question

Angularjs 2.0 doesn't load templateUrl

I am new for

. I have created a sample application,and have an issue in loading

My app.ts file:

import {bootstrap, Component} from 'angular2/angular2';
selector: 'my-app',
templateUrl: 'grid.html'
class AppComponent { }

I change the path like
but it doesn't work for me too.

Someone help me..!

Joy Joy
Answer Source

If your directory structure is like this:

|- app
   |- grid.html
   |- component.ts

Then use templateUrl: 'app/grid.html'.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download