Created
May 3, 2017 20:21
-
-
Save bdirito/c83c446660211ba359883fbf69d35d46 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- file: app.module -- | |
// import browser etc | |
import { XModule } from './x.module' | |
@NgModule({ | |
imports: [ ..., XModule ] | |
// entryComponents? | |
// bootstrap? | |
// something? | |
}) ... | |
-- file: x.module -- | |
import { XComponent } from './x.component' | |
@NgModule({ | |
declarations: [ XComponent ] | |
exports: [ XComponent ] | |
}) ... | |
-- file: x.component -- | |
@Component({ ... }) export class XComponent ... | |
ng1module.directive('xThing', ng2adapter.downgradeNg2Component(XComponent)) | |
-- file: index.html -- | |
... | |
<body> | |
<ng1stuff> | |
<x-thing></x-thing> | |
</ng1stuff> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment