GithubHelp home page GithubHelp logo

andr3i4o / angularprint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samwiseduzer/angularprint

0.0 2.0 0.0 279 KB

An Angular module that allows users to selectively print elements, as well as provides optimizations for tables

CSS 100.00%

angularprint's Introduction

AngularPrint

An Angular module that allows users to selectively print elements, as well as provides optimizations for printing. By default, printing margins are minimized.

Installation

  • make sure bower is installed
  • navigate to the root directory of your project and execute the command "bower install angular-print"
  • import module to your Angular app using the name "AngularPrint"

Using AngularPrint

printSection

  • Directive type: Attribute
  • Makes element and its children visible for printing
```html
I'll print

Me, too!

I won't
```

printOnly

  • Directive type: Attribute
  • Makes element and its children only visible for printing
```html
I'll print, but until then nobody wants me

Me, too!

Me, too! Except that people still want to look at me in the meantime...
```

printHide

  • Directive type: Attribute
  • Makes element invisible during printing, but it is replaced by blank space
```html
I won't print

Me, either

I'll print, but those bozos upstairs are still taking up space
```

printRemove

  • Directive type: Attribute
  • Makes element invisible during printing
```html
I won't print

Me, either

I'll print, and those bozos upstairs will finally stop making such a ruckus
```

printIf

  • Directive type: Attribute
  • Toggles print-visibility based on expression
```html
```

printBtn

  • Directive type: Attribute
  • Adds onClick callback to element that will trigger printing
```html Doesn't matter where you put me I will make anything cause a print

to happen if you click me

```

printLandscape

  • Directive type: Attribute
  • Will cause printing to be landscape instead of portrait
```html Doesn't matter where you put me I will cause any print

to be landscape

```

printAvoidBreak

  • Directive type: Attribute
  • Prevents page breaks on element
```html This element won't get split by page breaks ```

printTable

  • Directive type: Attribute
  • Optimizes table for printing. This includes keeping 'td' cell content from being cut-off by page breaks.
  • Must be passed an array scope object representing the data presented by the table
  • Column headers will persist between pages only if the `````` and `````` tags are used correctly
This example shows adjustments to an already-visible table in order to tailor it for printing ```html
Unwanted field Name Address Phone
{{person.unwantedInfo}} {{person.name}} {{person.address}} {{person.phone}}
``` This example shows a table made to only be visible during printing ```html
Name Address Phone
{{person.name}} {{person.address}} {{person.phone}}
```

angularprint's People

Contributors

samwiseduzer avatar bmbarker90 avatar maximization avatar pellenberger avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.