我不知道是怎么回事,因为我是Angular2,打字稿,es5和es6的新手。看看。我不明白为什么我的FirstComponent没有在first.ts文件中被调用。
我有以下的执行情况。
app.ts
import {bootstrap, Component, CORE_DIRECTIVES} from 'angular2/angular2'
import {FirstComponent} from 'first' // please explain what should be here. 'first','./first'
我使用Angular2 在和文件中./src/app/app.path.我添加了‘我的-新路由’,我想把它命名为:"my.route“
export const routes: RouterConfig = [
{ path: '', component: Home },
{ path: 'home', component: Home },
// make sure you match the component type string to the require in asyncRoutes
{ path: 'ab
我想在视频上动态加载字幕。 let subs:TextTrack = video.addTextTrack('subtitles');
for (let dataSrt of dataSrts) {
let cue: any = new VTTCue(
dataSrt['startTime'],
dataSrt['endTime'],
dataSrt['text']
);
subs.addC
我在angular2应用中实现了@ngrx,当我试图编译typescript项目时,我得到了下面的错误。
Error:(40, 20) TS2339:Property 'map' does not exist on type 'string | Book | Book[]'. Property 'map' does not exist on type 'string'.
我认为这个错误与ngrx示例应用程序中使用的typescript的联合类型有关
我已经用angular2中的以下内容更新了Package.json引用,但是在更新之后,我在浏览器控制台中得到了以下404错误:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:55413/angular2/src/facade/async Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:55413/a