systemjs

Angular2 Material Design alpha.9-3 has '404 not found' for @angular/material

五迷三道 提交于 2019-12-05 07:33:34
I have followed the instructions at angular material2 Getting Started to install @angular/material. Via Atom, I updated package.json, app.module, and beyond the Getting Started instructions, I updated systemjs.config, as follows: '@angular/material':'node_modules/@angular/material', I get these errors: zone.js:1274 GET http://localhost:3000/node_modules/@angular/material/ 404 (Not Found) (SystemJS) XHR error (404 Not Found) loading http://localhost:3000/node_modules/@angular/material (…) I believe I have tracked the problem to the fact that many @angular folders have a bundle sub-folder

TypeScript+SystemJS using JSON and Text plugins

最后都变了- 提交于 2019-12-05 05:42:51
Using TypeScript with SystemJS , how can I import a JSON file using plugin-json ? If I write System.import('myjson.json!json').then(...) then it imports it asynchronously and not as a part of System.register([...]) . So, how can I import a JSON file as a part of System.register([...]) and convincing TypeScript to agree to this? (without then Promise syntax). Note: I'm using the tsc flag -m system Update: A possible solution is to use the -m umd option for tsc instead of -m system , then I can do the following: /// <reference path="typings/requirejs/require.d.ts" /> var myJson = require('myJson

Options for importing modules in Angular2 (TS)

☆樱花仙子☆ 提交于 2019-12-05 05:20:52
I know there's some progress or at least plans ( #5093 , #5728 ) to improve typescript's module paths mapping, but I was wondering what are our options at this moment (Angular2 beta.1, TypeScript 1.7, VS Code 0.10.5, nodejs 5.4, systemjs 0.19). In order to make everyone happy (compiler, editor and browser) I'm using following syntax to import modules: // C:/~somepath~/project_name/src/scripts/app/components/search/search.component.ts import {Component} from 'angular2/core'; import {EmitterService} from '../../../core/services/emitter/emitter.service'; import {SearchService} from '../../../app

AngularJS2.0 教程系列(一)

最后都变了- 提交于 2019-12-05 03:58:21
Why Angular2 Angular1.x显然非常成功,那么,为什么要剧烈地转向Angular2? 性能的限制 AngularJS 当初是提供给设计人员用来快速构建HTML表单的一个内部工具。随着时间的推移,各种特性 被加入进去以适应不同场景下的应用开发。然而由于最初的架构限制(比如绑定和模板机制),性能的 提升已经非常困难了。 快速变化的WEB 在语言方面,ECMAScript6的标准已经完成,这意味着浏览器将很快支持例如模块、类、lambda表达式、 generator等新的特性,而这些特性将显著地改变JavaScript的开发体验。 在开发模式方面,Web组件也将很快实现。然而现有的框架,包括Angular1.x对WEB组件的支持都不够好。 移动化 想想5年前......现在的计算模式已经发生了显著地变化,到处都是手机和平板。Angular1.x没有针对移动 应用特别优化,并且缺少一些关键的特性,比如:缓存预编译的视图、触控支持等。 简单易用 说实话,Angular1.x太复杂了,学习曲线太陡峭了,这让人望而生畏。Angular团队希望在Angular2中将复杂性 封装地更好一些,让暴露出来的概念和开发接口更简单。                                                       Rob Eisenberg / Angular 2

Angular2 lazy loading modules: how to create a build package with SystemJS Builder?

杀马特。学长 韩版系。学妹 提交于 2019-12-05 03:45:02
i'm using Angular2 and SystemJS to create a web application. I have some modules in my app and in the router configuration i use lazy loading to open them. Here is a routing file of my app that lazy loads two modules: const appRoutes: Routes = [ { path: '', component: MainComponent, canActivate: [AuthGuard], children: [ { path: 'dashboard', component: DashboardComponent }, { path: 'first-section', loadChildren: 'app/modules/FIRST-SECTION/first-section.module' }, { path: 'second-section', loadChildren: 'app/modules/SECOND-SECTION/second-section.module' }, { path: 'documents', component:

How to import a npm package in an angular2 component?

流过昼夜 提交于 2019-12-05 01:59:49
I'm trying to learn the ropes of ng2 and the depedency injection system is killing me. I'm using the ng quickstart from: https://github.com/angular/quickstart/blob/master/README.md I'm trying to import this package into the app: https://www.npmjs.com/package/arpad . I installed the package via npm update, my package.json dependencies look like this: "dependencies": { "angular2": "2.0.0-beta.9", "systemjs": "0.19.24", "es6-promise": "^3.0.2", "es6-shim": "^0.35.0", "reflect-metadata": "0.1.2", "rxjs": "5.0.0-beta.2", "zone.js": "0.5.15", "arpad":"^0.1.2" <----- the package i'm trying to import

jspm: Error when importing a jQuery plugin

佐手、 提交于 2019-12-05 01:46:35
问题 I'm trying to import a jQuery plugin (namely https://github.com/Mottie/Keyboard) using jspm/SystemJS. At first, I installed the module by simply typing the following command: jspm install github:mottie/keyboard I then added the line to import the library in my code, just after importing jQuery: import keyboard from 'mottie/keyboard'; However, when running the code, I encountered the following error: Uncaught TypeError: Multiple defines for anonymous module Googling the error didn't provide me

Load node module with SystemJS and Karma in Angular 2

◇◆丶佛笑我妖孽 提交于 2019-12-05 01:40:51
I'm building a web app using Angular 2, SystemJS, and Karma for tests. I'm trying to load the node module ngrx/store in a test: import { it, describe, expect, beforeEach, inject } from 'angular2/testing'; import { Store } from '@ngrx/store'; describe('Graphs store', () => { let graphs; beforeEach(inject([Store], (store: Store<any>) => { graphs = store.select('graphs'); })); it('works', () => { // expect graphs to do something... }); }); However, my tests fail with the following message: 404: /@ngrx/store Chrome 48.0.2564 (Mac OS X 10.11.3) ERROR Error: XHR error (404 Not Found) loading http:/

Angular2 lazy loading a route issue

老子叫甜甜 提交于 2019-12-04 19:20:31
Angular2 lazy loading a route issue. I'm using Angular2, typscript, html5 and systemjs. I'm trying to get lazy loading working for one of my basic routes. This is the blog I'm following but I can't seem to get it working: http://blog.angular-university.io/angular2-ngmodule/ This is the console error I get: Uncaught (in promise): Error: Cannot match any routes. URL Segment: '500' My page is the 500 page. Below I have added my files at there current state. Module for 500 page: import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { Component500 } from '

Angular 2 gives SystemJS cannot find /angular2/http module

我怕爱的太早我们不能终老 提交于 2019-12-04 16:06:03
问题 I have created a service for Angular 2: import {Injectable} from "angular2/core"; import {Http} from "angular2/http"; import {TaskModel} from "./tasks.model" @Injectable() export class TasksDataService { tasks:Array<any>; constructor(http:Http) { this.tasks = [ new TaskModel("Dishes"), new TaskModel("Cleaning the garage"), new TaskModel("Mow the grass") ]; } getTasks():Array<any> { return this.tasks; } } When I run my program the browser shows: system.src.js:1049 GET http://localhost:3000