0
Plunker에서 제공하는 기본 템플릿을 사용하여 angular2 앱을 만들면서 Plunker의 angular2 앱으로 angular2-moment를 가져 오려고했습니다.Plunker가 angular2-moment 패키지를 angular2 앱에 추가합니다.
import * as moment from 'moment';
이 내 plunker의 config.js 내가 여기 실종 무엇
System.config({
//use typescript for compilation
transpiler: 'typescript',
//typescript compiler options
typescriptOptions: {
emitDecoratorMetadata: true
},
paths: {
'npm:': 'https://npmcdn.com/'
},
//map tells the System loader where to look for things
map: {
'app': './src',
....other angular2 packages work fine...
'rxjs': 'npm:rxjs',
'moment': 'npm:[email protected]',
'angular2-moment': 'npm:[email protected]',
'typescript': 'npm:[email protected]/lib/typescript.js'
},
//packages defines our app package
packages: {
'app': {
main: './main.ts',
defaultExtension: 'ts'
},
'rxjs': {
defaultExtension: 'js'
},
'angular2-moment': {
defaultExtension: 'js'
}
}
});
과 같은 방법입니까? 다음과 같은