我无法运行 Angular 2 项目。
我尝试过: - 使用 npm install 和 npm start 运行项目 | 不起作用 - 我从 github 克隆了快速启动并替换为我的 src 文件夹,但我仍然得到“在 @angular/core 中找不到模块”
这是完整的控制台输出:https://www.dropbox.com/s/5plmqrjd6ge0lta/error.txt ?dl=0
我有图像 URL,我想在放置在 tableView 单元格中的 UIImageView 中显示该图像。我创建了一个自定义单元格并为 imageView 添加了一个出口。由于我正在加载新闻,因此 URL 会相应更改。注意:我正在使用 Alamofire 来处理我的 HTTP 请求。
struct News {
let title: String
let text: String
let link: String
let imgUrl: String
init(dictionary: [String:String]) {
self.title = dictionary["title"] ?? ""
self.text = dictionary["text"] ?? ""
self.link = dictionary["link"] ?? ""
self.imgUrl = dictionary["imgUrl"] ?? ""
}
}
Run Code Online (Sandbox Code Playgroud)
并将信息加载到我的自定义单元格
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as? newsCellTableViewCell
let news = newsData[indexPath.row]
cell?.headline.text …Run Code Online (Sandbox Code Playgroud)