Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ngmin
Search
Hannes Stiebitzhofer
January 17, 2014
Programming
95
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
600
Other Decks in Programming
See All in Programming
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.5k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
180
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
190
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
110
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
560
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
220
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
780
Inside Stream API
skrb
1
790
Oxlintのカスタムルールの現況
syumai
6
1.2k
act1-costs.pdf
sumedhbala
0
120
Contextとはなにか
chiroruxx
1
380
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
810
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Paper Plane (Part 1)
katiecoart
PRO
0
9.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Code Reviewing Like a Champion
maltzj
528
40k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
210
So, you think you're a good person
axbom
PRO
2
2.1k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
150
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
620
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Speed Design
sergeychernyshev
33
1.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.5k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
210
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]