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
0
91
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
590
Other Decks in Programming
See All in Programming
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
0
190
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
410
時計仕掛けのCompose
mkeeda
1
290
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
CI改善もDatadogとともに
taumu
0
110
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
190
Ruby on cygwin 2025-02
fd0
0
140
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
6
4k
Java Webフレームワークの現状 / java web framework at burikaigi
kishida
9
2.2k
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
160
Immutable ActiveRecord
megane42
0
140
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
21
2.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
9
440
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Mobile First: as difficult as doing things right
swwweet
223
9.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Become a Pro
speakerdeck
PRO
26
5.1k
Six Lessons from altMBA
skipperchong
27
3.6k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Adopting Sorbet at Scale
ufuk
74
9.2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
174
51k
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]