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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Hannes Stiebitzhofer
January 17, 2014
Programming
0
93
ngmin
Short presentation for first AngularJS Vienna meet up on April 17th, 2014.
Hannes Stiebitzhofer
January 17, 2014
Tweet
Share
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
高速開発のためのコード整理術
sutetotanuki
1
380
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
190
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.8k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.7k
Architectural Extensions
denyspoltorak
0
270
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
210
AI & Enginnering
codelynx
0
100
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
640
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
290
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
140
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
310
Embracing the Ebb and Flow
colly
88
5k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
130
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
270
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
170
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Language of Interfaces
destraynor
162
26k
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]