0.7.6 • Published 4 years ago

angular-generics v0.7.6

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Angular Generics


!!! Work In Progress !!!


Content

SelectorOutput
agc-
InputTypeDefault Value
heightstring | number'inherit'
widthstring | number'inherit'
gapstring | number
padstring | number
anchorstring'start'
flowstring'row'
rowsstring | number'auto'
colsstring | number'auto'
app.module.ts
import { GenericContentModule } from 'angular-generics';

@NgModule({
  imports: [
    GenericContentModule
  ]
})
content-example.html
  <agc [height]="200" [width]="'100%'" [rows]="1" [cols]="4"
              [gap]="5" [pad]="5" [anchor]="'start'" [flow]="row">

              <!-- content -->

  </agc>
another-content-example.html
  <agc [height]="'1.8em'" [width]="25" [rows]="'1fr'"
              [cols]="'1fr 1fr'" [gap]="'5px 10px'" [flow]="col"
              [pad]="'5px 5px 1px 5px'" [anchor]="'center center'">

              <!-- content -->

  </agc>

Alert

SelectorInputOutputService
ag-alert--GenericAlertService
app.module.ts
import { GenericAlertModule,
         GenericAlertService } from 'angular-generics';

@NgModule({
  imports: [
    GenericAlertModule
  ],
  providers: [
    GenericAlertService,
  ]
})
alert-example.html
  <ag-alert></ag-alert>
alert-example.ts
import { Component } from '@angular/core';
import { GenericAlertService, GenericAlert } from 'angular-generics';

@Component({
  templateUrl: './alert-example.html',
})
export class AlertExampleComponent {

  constructor(private alertService: GenericAlertService) { }

  showAlert() {
    let alert = new GenericAlert();
    alert.message = "You have an alert!";
    alert.timeout = 2000; // optional

    this.alertService.addAlert(alert);
  }
}
GenericAlert
export class GenericAlert {
  message: string;
  timeout: number;
}

Modal

Selector
ag-modal
InputTypeDefault Value
footerTemplateRef\<any>
headerTemplateRef\<any>
titlestring
OutputType
closed-
app.module.ts
import { GenericModalModule } from 'angular-generics';

@NgModule({
  imports: [
    GenericModalModule
  ]
})
modal-example.html
  <button (click)="exampleModal.open()">Open Modal</button>

  <ag-modal #exampleModal [title]="'Example Modal'">

    <!-- content -->

  </ag-modal>
modal-example.ts
import { Component } from '@angular/core';

@Component({
  templateUrl: './modal-example.html',
})
export class ModalExampleComponent {

  constructor() { }

}

Button

Selector
ag-button
InputTypeDefault Value
widthstring | number'inherit'
heightstring | number'inherit'
fontSizestring | number'inherit'
disabledbooleanfalse
OutputType
click-
app.module.ts
import { GenericButtonModule } from 'angular-generics';

@NgModule({
  imports: [
    GenericButtonModule
  ]
})
button-example.html
<ag-button (click)="buttonClicked()">Example</ag-button>
button-example.ts
import { Component } from '@angular/core';

@Component({
  templateUrl: './button-example.html',
})
export class ButtonExampleComponent {

  constructor() { }

  buttonClicked(){
    // example button clicked
  }
}

more documentation soon

0.7.6

4 years ago

0.7.5

4 years ago

0.7.0

4 years ago

0.6.3

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.0

4 years ago

0.5.1

4 years ago

0.4.6

4 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.1.25

4 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.30

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago