Tag: 量angular器

在OS X上的Angular 2教程El Capitan在浏览器中返回“Can not GET /”

我正在尝试在OS X上使用TypeScript来处理Angular 2。我已经按照教程进行了编译,并且没有收到任何错误。 npm start命令成功完成,并在Safari中显示新选项卡。 地址是http://localhost:3000唯一显示的是 不能获取 / 我不熟悉Lite-Server,我不知道我是否启动了一些让教程运行的东西。 有没有我错过了或某种方式来确定Lite-Server是否正在运行?

router_1.provideRouter在尝试运行Angular2 / NodeJS应用程序时不是函数

我创build了一个简单的NodeJS / Angular2应用程序,当我尝试访问应用程序的入口点页面时遇到以下错误: router_1.provideRouter is not a function 我不确定这个错误是什么意思,也不知道从哪里开始。 有没有人有任何见解或想法为什么这可能会发生? 这里是我的package.json文件(因为我认为这可能是与一个Angular软件包有关) { "name": "udemy-nodejs-angular2", "version": "1.0.0", "private": true, "scripts": { "start": "concurrently tsc -w && nodemon ./bin/www", "vendor": "gulp vendor", "gulp": "npm run vendor && gulp", "postinstall": "typings install", "typings": "typings" }, "dependencies": { "@angular/common": "^2.0.0-rc.2", "@angular/compiler": "^2.0.0-rc.2", "@angular/core": "^2.0.0-rc.2", "@angular/http": "2.0.0-rc.2", "@angular/platform-browser": "^2.0.0-rc.2", "@angular/platform-browser-dynamic": […]

在angular2中呈现不同的模板

我刚刚开始使用angular2并且面临着一些情况来组织我的逻辑。 我实际上是重构backend theme ,它由两个主要组成部分,即login view ,应该出现在页面加载和main dashboard ,将出现在成功login。 我没有main dashboard模板的问题,因为我重构了所有的代码工作正常。 然而,主要的问题是login模块,因为dashboard由sidebar , header和maincontent区域组成。 我真正的问题是,如何在加载login页面时排除sidebar , header ,这将成为我的应用程序的起点。 更确切地说,我可以使用独立于dashboard module的login module的布局吗? 这是我目前的仪表板的代码。 我真的很感激,如果有人可以帮助我以适当的方式构build这个应用程序。 PS我正在使用node作为后端 index.html <html> <head> <title>Angular 2 QuickStart</title> <script src="node_modules/core-js/client/shim.min.js"></script> <script src="node_modules/zone.js/dist/zone.js"></script> <script src="node_modules/reflect-metadata/Reflect.js"></script> <script src="node_modules/systemjs/dist/system.src.js"></script> <!– 2. Configure SystemJS –> <base href="/"> <script src="systemjs.config.js"></script> <script> System.import('app/main').catch(function(err){ console.error(err); }); </script> </head> <!– 3. Display […]

是否有可能更改量angular器事件队列或控制stream?

我正在使用量angular器和jasmine2自动化我们的angularjs + nodejs应用程序的自动化项目。 所以作为自动化的一部分,我有一个场景,我需要上传一个文件,点击file uploadbutton,上传正在进行中,我需要点击另一个button,并validation一些东西。 而当我执行我的脚本时,量angular器正在等待自己,直到上传过程完成,以执行进一步的步骤。 有没有办法处理这个? 就是说点击上传button后,脚本就需要执行下一个动作,甚至不用等待上传完成。 我确信这是与控制stream相关的事件,承诺被添加到事件队列中。 有没有办法改variablesangular器的事件队列?

当我使用'npm start'命令时,找不到名字'Promise'错误

对于Angular 2来说是新的。我完成了5分钟的快速入门教程,并继续尝试这个ScotchIO的例子 。 我只是试图使用与示例中相同的确切代码。 当我通过npm install安装节点模块后运行npm start命令时,我得到了exception。 [system]:~/Coding/Angular2/SecondApp$ npm start > learning-angular@1.0.0 start /home/swetha/Coding/Angular2/SecondApp > tsc && concurrently "npm run tsc:w" "npm run lite" node_modules/@angular/core/src/application_ref.d.ts(79,88): error TS2304: Cannot find name 'Promise'. node_modules/@angular/core/src/application_ref.d.ts(137,42): error TS2304: Cannot find name 'Promise'. node_modules/@angular/core/src/application_ref.d.ts(196,33): error TS2304: Cannot find name 'Promise'. node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,15): error TS2304: Cannot find name 'Map'. node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(26,16): error TS2304: […]

是否所有的依赖推荐angular2 quickstart真的需要?

我是angular2的新手,我从来没有使用过angular1。 我一直在尝试这个教程https://angular.io/guide/quickstart ,我不知道是否所有推荐的依赖关系是非常必要的,因为我的项目大小在'npm install'之后变得很大(大于100Mb)。

build立在TFS上想从Node.jstesting项目复制一个可执行文件

我使用Node.js工具为一个量angular器testing环境创build了一个Node.js项目来testing团队基础服务器上的一个Web应用程序。 在本地我可以创buildtesting项目并使用debugging器运行它。 但是,TFS上的构build不起作用。 日志: "<PATH>\TestProject.Web.Protractor.Tests.njsproj" (13) on node 2 (default targets). 13>PrepareForBuild: Creating directory "obj\Debug\". CoreCompile: Creating directory "bin". Copying file from "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Node.js Tools\Microsoft.NodejsTools.WebRole.dll" to "bin\Microsoft.NodejsTools.WebRole.dll". _CopyWebApplicationLegacy: Copying Web Application Project Files for TestProject.Web.Protractor.Tests Creating directory "<PATH>\bin\_PublishedWebsites\TestProject.Web.Protractor.Tests\bin". 13>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications\Microsoft.WebApplication.targets(136,5): error MSB3030: Could not copy the file "obj\Debug\TestProject.Web.Protractor.Tests.exe" because it was not found.

合并angular2模板时在html中的EOF字符?

我有一个nodeJS应用程序读取目录中的所有.md文件,然后使用marked将其内容呈现为HTML。 然后我将结果用作Angular2模板。 但是,我现在正在得到像这样的控制台错误: Unhandled Promise rejection: Template parse errors: Unexpected character "EOF" (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.) ("width="760" height="1300" frameborder="0" marginheight="0" marginwidth="0">Loading…</iframe> </div>[ERROR ->]"): chapterComponent@1805:6 Invalid ICU message. Missing '}'. (" <code>css [ERROR ->]{{' Page { background-color: white; "): chapterComponent@395:0 ; Zone: <root> ; […]

如何在量angular器中调用其他testing用例中的常见testing用例

我正在使用量angular器testing我的Web应用程序,并与我有大约30个testing用例。 我有一个常见的testing案例,我检查从html清单属性中获取的网站的版本。 我可以使用这个和每个testing用例,但我想知道有没有一种方法,我可以创buildtesting规范文件只有一个testing用例来检查文件的版本,这个spec文件是由所有其他规格文件? 请给我提供宝贵的知识。

meteor – rxjs@5.0.0-beta.11或rxjs@5.0.0-beta.6日暮依赖

我有angular2meteor项目的这个问题,如果我安装(与meteornpm安装)包rxjs5.0.0-beta.11 nam说: @angular/router@3.0.0-alpha.8 requires a peer of rxjs@5.0.0-beta.6 but none was installed. 如果我安装包rxjs@5.0.0-beta.6 nam说:“ npm WARN @angular/core@2.0.0-rc.6 requires a peer of rxjs@5.0.0-beta.11 but none was installed. npm WARN angular2-google-maps@0.14.0 requires a peer of rxjs@5.0.0-beta.11 but none was installed. “ 典型的问题“狗追尾”的问题,如果我安装beta.11 beta.6,如果我安装beta.6需要beta.11这是我的package.json { "name": "angular2-meteor-base", "private": true, "scripts": { "start": "meteor run", "test": "meteor test –driver-package […]