-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,164 additions
and
175 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* Entry point for this Angular library, do not move or rename this file. | ||
*/ | ||
export * from './src/bit-test.component'; | ||
export * from './src/bit-test2.component'; | ||
export * from './src/bit-test.module'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Component } from "@angular/core"; | ||
import { BitTestService } from './bit-test.service'; | ||
|
||
@Component({ | ||
selector: 'bit-test', | ||
template: ` | ||
<p>bit-test component works!</p> | ||
<small>{{ service.content }}</small> | ||
` | ||
}) | ||
export class BitTestComponent { | ||
constructor(public service: BitTestService) {} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
labels: ['angular', 'typescript', 'bit-test'] | ||
description: 'A `bit-test` component.' | ||
--- | ||
|
||
# Bit test documentation | ||
Import `BitTestModule` : | ||
|
||
```typescript | ||
import { BitTestModule } from './bit-test.module'; | ||
|
||
// add it to your module imports | ||
@NgModule({ | ||
// ... | ||
imports: [ | ||
BitTestModule | ||
] | ||
// ... | ||
}) | ||
export class AppModule {} | ||
``` | ||
|
||
Use `BitTestComponent` in your templates : | ||
|
||
```html | ||
<bit-test></bit-test> | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { BitTestComponent } from './bit-test.component'; | ||
import { BitTest2Component } from './bit-test2.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
BitTestComponent, | ||
BitTest2Component | ||
], | ||
exports: [ | ||
BitTestComponent, | ||
BitTest2Component | ||
] | ||
}) | ||
export class BitTestModule {} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Injectable } from '@angular/core'; | ||
|
||
@Injectable({ providedIn: 'any' }) | ||
export class BitTestService { | ||
get content() { | ||
return 'Content from service'; | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { BitTestComponent } from './bit-test.component'; | ||
|
||
describe('BitTestComponent', () => { | ||
let component: BitTestComponent; | ||
let fixture: ComponentFixture<BitTestComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ BitTestComponent ] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(BitTestComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
|
||
it('should have a service', () => { | ||
expect(component.service).toBeDefined(); | ||
expect(component.service.content).toEqual('Content from service'); | ||
}) | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'bit-test2', | ||
template: ` | ||
<p> | ||
bit-test 2 works as well! | ||
</p> | ||
` | ||
}) | ||
export class BitTest2Component {} |
16 changes: 16 additions & 0 deletions
16
examples/demo-lib-v13/src/compositions/bit-test.composition.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Component, NgModule } from '@angular/core'; | ||
import { BitTestModule } from '../bit-test.module'; | ||
|
||
@Component({ | ||
selector: 'composition-cmp', | ||
template: `Composition: <bit-test></bit-test>` | ||
}) | ||
class CompositionComponent {} | ||
|
||
@NgModule({ | ||
declarations: [CompositionComponent], | ||
imports: [BitTestModule], | ||
bootstrap: [CompositionComponent] | ||
}) | ||
export class CompositionModule { | ||
} |
14 changes: 14 additions & 0 deletions
14
examples/demo-lib-v13/src/compositions/cmp1.composition.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'bit-composition', | ||
template: ` | ||
<p> | ||
Composition component 1 | ||
</p> | ||
`, | ||
styles: [ | ||
] | ||
}) | ||
export class StandaloneCompositionComponent { | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Aspect } from '@teambit/harmony'; | ||
|
||
export const AngularV13Aspect = Aspect.create({ | ||
id: 'teambit.angular/angular-v13', | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
description: A Bit development environment for Angular Components | ||
labels: ['angular', 'environment', 'env', 'aspect', 'extension'] | ||
--- | ||
|
||
Adds Angular v13 support to your Bit workspace. |
Oops, something went wrong.