-
Notifications
You must be signed in to change notification settings - Fork 12
Home
stefano edited this page Apr 27, 2017
·
19 revisions
in SystemJs use the following configuration
transpiler: 'typescript',
map: {
'ngx.leaflet.components': 'ngx.leaflet.components',
},
packages: {
'ngx.leaflet.components': {
main: './index',
defaultExtension: 'js',
meta: {
"format": "register"
}
}
},
"ts": {
"main": "plugin.js"
},
"typescript": {
"main": "typescript.js",
"meta": {
"lib/typescript.js": {
"exports": "ts"
}
}
}
I haven't tested it with other transpilers save for typescript, thats why I am including it on the SystemJs config
then on you app module include this
import { CandTLeafletComponent } from 'ngx.leaflet.components';
import { CandTLeafletService } from 'ngx.leaflet.components';
import { AppComponent } from './components/app.component';
@NgModule({
imports: [... ],
declarations: [..., CandTLeafletComponent],
providers: [CandTLeafletService],
bootstrap: [AppComponent]
})
Leaflet stylesheet is not included, so you need to add it yourself
Some basic documentation can be found both in the current wiki and the following link
components and usage