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
98
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
yield再入門 #phpcon
o0h
PRO
0
1.2k
リアルな遅延を測る仕様
kota_yata
1
120
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
730
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
1
140
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
710
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.8k
AIを紡ぐPMのお話
swdtkuy
0
120
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
150
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
0
150
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
580
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
220
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
340
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Believing is Seeing
oripsolob
1
190
How STYLIGHT went responsive
nonsquared
100
6.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How to train your dragon (web standard)
notwaldorf
97
6.8k
It's Worth the Effort
3n
188
29k
How GitHub (no longer) Works
holman
316
150k
We Are The Robots
honzajavorek
0
300
sira's awesome portfolio website redesign presentation
elsirapls
0
330
Fireside Chat
paigeccino
42
4k
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]