标尺服务不能作为本地依赖项 [英] Ruler service not working as local dependency

查看:59
本文介绍了标尺服务不能作为本地依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用此插件将代码作为基础: http://plnkr.co/edit/81nWDyreYMzkunihfRgX? p =预览

I based my code using this plunker: http://plnkr.co/edit/81nWDyreYMzkunihfRgX?p=preview

如您所见,正在远程加载依赖项(带有http/s的脚本),然后我使用node更改它们,并用package.json和tsconfig.json本地替换所有依赖项.

As you can see is loading dependencies remotely (scripts with http/s), then I change them using node and replacing all dependencies locally with a package.json and tsconfig.json.

但是,当像这样将标尺和矩形依赖项更改为local时:

However, when changing the ruler and rectangle dependencies to local like this:

import {Ruler, Rectangle} from "angular2/src/platform/browser/ruler";

出现错误,提示:

"SyntaxError: expected expression, got '<'
Evaluating http://localhost:3000/angular2/src/platform/browser/ruler
Error loading http://localhost:3000/src/main.ts" angular2-polyfills.js:138:14

SyntaxError: expected expression, got '<'

推荐答案

https://github.com/angular/angular/pull/8452#issuecomment-220460761

mhevery评论了12天前 我们已决定删除标尺服务,因此它不属于公共API.

mhevery commented 12 days ago We have decided to remove Ruler service, and so it is not part of the public API.

这篇关于标尺服务不能作为本地依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆