Skip to content

Commit

Permalink
release 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
winkerVSbecks committed Nov 19, 2014
1 parent 0c3fdfd commit 0c9fbdb
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-pdf-viewer",
"version": "0.1.0",
"version": "0.2.0",
"description": "An AngularJS directive to display PDFs",
"main": "./dist/angular-pdf-viewer.min.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-pdf-viewer.min.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-pdf-viewer",
"version": "0.1.0",
"version": "0.2.0",
"author": "Varun Vachhar",
"description": "An AngularJS directive to display PDFs",
"repository": {
Expand Down
9 changes: 7 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Angular PDF Viewer (0.1.0)
# Angular PDF Viewer (0.2.0)

An AngularJS directive to display PDFs. [DEMO](http://codepen.io/winkerVSbecks/full/50010e383d0f80deab97858571400d86/)

Expand Down Expand Up @@ -62,7 +62,7 @@ The following methods are available to the delegate:
- load


## Change the Pdf File
## Change the PDF File

In order to replace the active PDF with another one, you can call the `load` method of the delegate. For example:

Expand All @@ -73,6 +73,11 @@ pdfDelegate
```


## Example

Run `npm install && bower install` to install all dependencies. And then `gulp dev` to start a local server. The example will now be available at [localhost:3000/src](http://localhost:3000/src)


## Toolbar
The default toolbar can be shown or hidden using the `show-toolbar` attribute. Since the PDF can be easily controlled using the delegate service it's quite trivial to build a custom toolbar. Or place the toolbar on a separate scope.

Expand Down
29 changes: 21 additions & 8 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,36 @@ <h1 class="h0 mt0 mb0 white inline">AngularJS PDF Viewer</h1>
scale="1"
show-toolbar="true"></pdf-viewer>

<div class="mb1">
<button ng-click="loadNewFile()"
class="button-blue-outline mb1">Load the Second Different File</button>
</div>

<footer class="py4">
<div class="sm-table">
<div class="sm-table-cell full-width py2 xs-center">
<div class="h5 bold px1">
<a ng-click="loadNewFile('pdf/relativity.pdf')"
class="button button-narrow button-nav-light">
Load the Relativity PDF
</a>
<a ng-click="loadNewFile('pdf/material-design.pdf')"
class="button button-narrow button-nav-light">
Load the Material Design PDF
</a>
</div>
</div>
</div>
</footer>
</div>
</div>

<script src="lib/pdfjs-dist/build/pdf.combined.js"></script>
<script src="lib/angular/angular.js"></script>
<!-- // <script src="/dist/angular-pdf-viewer.min.js"></script> -->
<!-- // <script src="test-app.js"></script> -->
<script src="/dist/angular-pdf-viewer.min.js"></script>
<script src="test-app.js"></script>

<script src="js/delegate-service.js"></script>
<!-- <script src="js/delegate-service.js"></script>
<script src="js/pdf-viewer-delegate.js"></script>
<script src="js/pdf-ctrl.js"></script>
<script src="js/pdf-viewer.js"></script>
<script src="js/pdf-viewer-toolbar.js"></script>
<script src="test-app.js"></script>
<script src="test-app.js"></script> -->
</body>
</html>
6 changes: 3 additions & 3 deletions src/test-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ angular.module('testApp', ['pdf'])
'pdfDelegate',
'$timeout',
function($scope, pdfDelegate, $timeout) {
$scope.pdfUrl = 'pdf/relativity.pdf';
$scope.pdfUrl = 'pdf/material-design.pdf';

$scope.loadNewFile = function() {
$scope.loadNewFile = function(url) {
pdfDelegate
.$getByHandle('my-pdf-container')
.load('pdf/material-design.pdf');
.load(url);
};
}]);

0 comments on commit 0c9fbdb

Please sign in to comment.