Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ngmin
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Hannes Stiebitzhofer
January 17, 2014
Programming
99
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ngmin
Short presentation for first AngularJS Vienna meet up on April 17th, 2014.
Hannes Stiebitzhofer
January 17, 2014
More Decks by Hannes Stiebitzhofer
See All by Hannes Stiebitzhofer
FormulaJS
stiebitzhofer
0
180
Rails AngularJS Bower Heroku
stiebitzhofer
4
610
Other Decks in Programming
See All in Programming
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
420
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
130
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
240
GraphQL の onError と Nullability のこれから
quramy
0
210
Distance field of Julia set
kinakomoti321
0
310
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.8k
小さなアプリを作って公開するまで
onozaty
0
150
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
330
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
3
1.5k
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
310
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
240
Color Theory Basics | Prateek | Gurzu
gurzu
1
510
Designing for humans not robots
tammielis
254
26k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Six Lessons from altMBA
skipperchong
29
4.6k
Transcript
AngularJS, April 17th, 2014 ! Hannes Stiebitzhofer
[email protected]
@stiebitzhofer ngmin
Angular does the magic via Dependency Injection var app =
angular.module("app", []); app.service("Store", function() { this.products = { item: "apple" }; }); app.controller("AppCtrl", function ($scope, Store) { $scope.products = Store.products; });
Minifying JS breaks everything! Error: Unknown provider: nProvider <- n
'Annotations' for names fixes the problem var app = angular.module('app',
[]); app.service('Store', function() { this.products = { item: 'apple' }; }); app.controller('AppCtrl', [ '$scope', 'Store', function ($scope, Store) { $scope.products = Store.products; } ]);
ngmin adds the annotations automatically Installation npm install -g ngmin
Command line usage ngmin somefile.js somefile.annotate.js Install for usage in grunt npm install grunt-ngmin --save-dev
Unfortunately global variables aren’t supported yet 'use strict'; var RabhApp
= angular.module(‚RabhApp' ['ngResource', ‚ngRoute']); ! RabhApp.factory('PostModel', function($resource) { return $resource(‚/posts/:post_id' {post_id:’@id’})….
ngmin for Ruby on Rails Add to Gemfile gem 'ngmin-rails'
Integrates seamlessly into the Rails asset pipeline Illustrated by my boilerplate app found on Github https://github.com/stiebitzhofer/rails- angular-bower-heroku
Links You find everything on Github https://github.com/btford/ngmin https://speakerdeck.com/stiebitzhofer/ngmin ! More
questions? Mail to
[email protected]