【问题标题】:Angular 2 tutorial : Cannot find module '../../both/collections/parties.collection'Angular 2教程:找不到模块'../../both/collections/parties.collection'
【发布时间】:2017-02-11 17:48:11
【问题描述】:

我正在关注社交应用教程:https://www.angular-meteor.com/tutorials/socially/angular2/3-way-data-binding 但我在第 3 步出错:Cannot find module ../../both/collections/parties.collection。请注意,typings 和 typings-core 都已安装,我可以在 node_modules 下看到它们。 那么是什么导致了错误呢?

这是我的结构:

parties.collection.tsmyApp/both/collections/

我调用 parties.collection.ts 的主要组件文件位于 myApp/client/imports/app 下:

import { Parties } from '../../both/collections/parties.collection';

【问题讨论】:

  • 可能想详细说明一下文件结构
  • 我更新了我原来的帖子
  • 尝试将另一个../ 添加到路径中,我认为它正在以当前设置的方式在client 文件夹中查找。
  • 你们是对的人。天哪,他们怎么会在官方教程中犯这样的错误!
  • 经验教训。永远不要依赖教程并自己找出错误!现在我需要更新各处的路径!谢谢你们,特别是 Sasquatch3o3

标签: meteor angular


【解决方案1】:

在路径中再添加一个../,教程中演示不正确。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-16
    • 1970-01-01
    • 1970-01-01
    • 2019-02-17
    • 1970-01-01
    相关资源
    最近更新 更多