NG2 에이스 패키지를 포함하지만, 난 항상 오류가 '모듈 NG2 에이스를 찾을 수 없습니다' .각도 2 내가 사업부에 에이스 편집기 태그를 사용하는, 고궁 박물원 패키지 <a href="https://www.npmjs.com/package/ng2-ace" rel="nofollow">ng2-ace</a> 작업을 얻기 위해 노력했습니다
그래서이 내 app.component.ts
import { Component } from '@angular/core';
import { AceEditorDirective } from 'ng2-ace';
@Component({
selector: 'my-app',
directives: [AceEditorDirective],
templateUrl: 'app/app.component.html'
})
export class AppComponent { }
/**
* System configuration for Angular samples
* Adjust as necessary for your application needs.
*/
(function (global) {
System.config({
paths: {
// paths serve as alias
'npm:': 'node_modules/',
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'app',
// angular bundles
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
// other libraries
'rxjs': 'npm:rxjs',
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api',
'brace': 'npm:brace',
'w3c-blob': 'npm:w3c-blob',
'buffer': 'npm:buffer-shims',
'ng2-ace': 'npm:ng2-ace'
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
app: {
main: './main.js',
defaultExtension: 'js'
},
rxjs: {
defaultExtension: 'js'
},
'angular-in-memory-web-api': {
main: './index.js',
defaultExtension: 'js'
},
'ng2-ace': {
format: 'cjs',
defaultExtension: 'js',
main: './index.js'
},
'w3c-blob': {
format: 'cjs',
defaultExtension: 'js',
main: './index.js'
},
'brace': {
format: 'cjs',
defaultExtension: 'js',
main: './index.js'
},
'buffer': {
format: 'cjs',
defaultExtension: 'js',
main: './index.js'
},
}
});
})(this);
중괄호가 NG2 에이스의 종속성 내 app.component.ts입니다 Depencey 버퍼를 가지고있는 의존성 w3c-blob.
저는 각도 2로 작업하기 시작 했으므로 워크 플로우에 익숙하지 않았습니다.
어쨌든 미리 감사드립니다.
Angular2의 어떤 버전을 사용하고 있습니까? – Sefa
2.0.2 추측 하든가 정확히 무엇을 의미합니까? –
package.json 파일에서 "@ angular/*"패키지에 대한 버전을 확인할 수 있습니까? – Sefa