Art Gallery application using dynamic API data built with AngularJS
See a Plunker
- Masonry 3 for mason blocking images.
- Bootstrap 3 for responsive layout.
- ngCookies for stateful experience.
- Angular Imgur API for dynamic images.
- Angular-Masonry directive.
Clone the repository
git clone [email protected]:gigablox/angular-art-gallery.git
These are ready to go for development and production environments.
/examples/development
/examples/production
This AngularJS project is wrapped in commonly used front end development tools to save you time. Development and production environments are configured to inject static assets managed by bower. Production build concats and compresses.
cd angular-art-gallery
npm install
bower install
npm install -g grunt-cli
Get an Imgur API key and add it to your app.config
$imgurGlobalProvider.options({
apiKey:'1234567890abcdefgh',
account:'YourAccountName'
});
grunt package:dev
grunt package:dev:watch
grunt package:prod
/build/development
/build/production
Nginx pushState server{}
rules
# Need this for $locationProvider.html5Mode(true); location / { try_files $uri /index.html; }
Apache pushState .htaccess
rules
#Need this for $locationProvider.html5Mode(true); RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !index RewriteRule (.*) index.html [L]
Here are more complete rules for both Nginx and Apache
Build your package and point the node server to /build/<environment>
node web-server.js
http://127.0.0.1:8000/index.html
Copyright (c) 2013 Daniel Kanze (@gigablox) Licensed under the MIT License.