Plunker 1 因以下错误而失败:
zone.js:323 Error: Error: XHR error (404 Not Found) loading http://run.plnkr.co/XaKTrrlcPIlCBySj/node_modules/rxjs/index.js(…)
Plunker 2 因其他错误而失败:
angular2-polyfills.js:349 Error: Cannot read property 'prototype' of undefined(…)
我被困住了,不知道如何继续......任何人都可以帮忙吗?
答案 0 :(得分:1)
您收到HTTP 404错误
The 404 or Not Found error message is a HTTP standard response code, in computer network communications, to indicate that the client was able to communicate with a given server, but the server could not find what was requested.
The web site hosting server will typically generate a "404 Not Found" web page when a user attempts to follow a broken or dead link; hence the 404 error is one of the most recognizable errors encountered on the World Wide Web.
所以基本上服务器无法找到资源“http://run.plnkr.co/XaKTrrlcPIlCBySj/node_modules/rxjs/index.js”。
由于服务器返回响应代码,客户端无法解决此错误。
此致 Sudhansu
答案 1 :(得分:1)
您需要使用此配置代替SystemJS,例如:
def parse_item(self, response):
sel = Selector(response)
tables = sel.xpath('//div[contains(@id, "superheroes")]/table/tr[2]/td[1]')
for name, data in zip(tables.xpath('./h2/text()'), tables.xpath('./table')):
item = Superheroes()
item['name'] = name.extract()
item['address'] = data.xpath('.//strong[1]/text()').extract()
item['state'] = data.xpath('.//strong[2]/text()').extract()
item['postal_code'] = data.xpath('.//strong[3]/text()').extract()
yield item
因为你的plunkr中没有map: {
app: "./src",
'@angular': 'https://npmcdn.com/@angular',
'rxjs': 'https://npmcdn.com/rxjs@5.0.0-beta.6'
},
文件夹......
将此plunkr视为示例:https://plnkr.co/edit/Qdm8GFsD5Rh1ioJV6jQM?p=info。
以下是Angular团队提供的RC版本模板:http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5?p=catalogue。