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
93
0
Share
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
170
Rails AngularJS Bower Heroku
stiebitzhofer
4
600
Other Decks in Programming
See All in Programming
へんな働き方
yusukebe
6
2.9k
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.7k
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
360
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
220
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
830
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
990
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
540
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.2k
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
310
飯MCP
yusukebe
0
490
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
420
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
200
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Claude Code のすすめ
schroneko
67
220k
Design in an AI World
tapps
0
190
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
720
Deep Space Network (abreviated)
tonyrice
0
110
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.4k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
480
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
790
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
510
New Earth Scene 8
popppiees
3
2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Side Projects
sachag
455
43k
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]