Skip to content

Commit

Permalink
Dynamic Angular 2 Components
Browse files Browse the repository at this point in the history
  • Loading branch information
seanlandsman committed Nov 28, 2016
1 parent 4e1dd13 commit 5b6c21c
Show file tree
Hide file tree
Showing 13,320 changed files with 1,557,120 additions and 671 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
7 changes: 6 additions & 1 deletion .gitignore
@@ -1,5 +1,10 @@
.idea/
*.iml

node_modules/
typings/

npm-debug.log
output/

# other
.DS_Store
11 changes: 6 additions & 5 deletions README.md
@@ -1,17 +1,18 @@

ag-Grid
==============
Angular 2 Dynamic Components
============================

Example of using ag-Grid with Angular2 and TypeScript
Example of creating Angular 2 Components Dynamically

Building
==============

== Build ==

To build:
- `npm install`
- `npm install tsd -g`
- `tsd install es6-shim`
- `npm run tsc`

To Run:
- `npm run lite`

3 changes: 0 additions & 3 deletions app/app.component.html

This file was deleted.

29 changes: 29 additions & 0 deletions app/app.component.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/app.component.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 7 additions & 9 deletions app/app.component.ts
@@ -1,15 +1,13 @@
import {Component,ViewContainerRef,Input} from '@angular/core';
import {AgGridNg2} from 'ag-grid-ng2/main';
import {AgGridCellRendererFactory} from 'ag-grid-ng2/main';
import {GridOptions} from 'ag-grid/main';
import {FromComponentComponent} from "./from-component.component";
import {FromTemplateComponent} from "./from-template.component";
import {FromRichComponent} from "./from-rich.component";
import {Component} from "@angular/core";
import {DynamicComponent} from "./dynamic.component";

@Component({
selector: 'my-app',
templateUrl: 'app/app.component.html',
directives: [FromComponentComponent, FromTemplateComponent, FromRichComponent]
template: `<grid-component [componentType]="getComponentType()"></grid-component>
`
})
export class AppComponent {
getComponentType() : any {
return DynamicComponent;
}
}
33 changes: 33 additions & 0 deletions app/app.module.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/app.module.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions app/app.module.ts
@@ -0,0 +1,16 @@
import {NgModule} from "@angular/core";
import {BrowserModule} from "@angular/platform-browser";
import {GridModule} from "./grid.module";
import {DynamicComponent} from "./dynamic.component";
import {AppComponent} from "./app.component";

@NgModule({
imports: [
BrowserModule,
GridModule.withComponents([DynamicComponent])
],
declarations: [AppComponent, DynamicComponent],
bootstrap: [AppComponent]
})
export class AppModule {
}
5 changes: 5 additions & 0 deletions app/boot.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/boot.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions app/boot.ts
@@ -1,4 +1,4 @@
import {bootstrap} from '@angular/platform-browser-dynamic';
import {AppComponent} from './app.component';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {AppModule} from './app.module';

bootstrap(AppComponent);
platformBrowserDynamic().bootstrapModule(AppModule);
16 changes: 0 additions & 16 deletions app/clickable.component.ts

This file was deleted.

25 changes: 25 additions & 0 deletions app/dynamic.component.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/dynamic.component.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions app/dynamic.component.ts
@@ -0,0 +1,8 @@
import {Component} from "@angular/core";

@Component({
selector: 'dynamic-component',
template: '<span> Dynamic Component! </span>',
})
export class DynamicComponent {
}
6 changes: 0 additions & 6 deletions app/from-component.component.html

This file was deleted.

112 changes: 0 additions & 112 deletions app/from-component.component.ts

This file was deleted.

6 changes: 0 additions & 6 deletions app/from-rich.component.html

This file was deleted.

0 comments on commit 5b6c21c

Please sign in to comment.