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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
240
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
610
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
150
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.6k
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
130
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
170
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
7
3k
Claude Codeログ基盤の構築
giginet
PRO
7
3.6k
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
380
Understanding Apache Lucene - More than just full-text search
spinscale
0
140
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
120
Feature Toggle は捨てやすく使おう
gennei
0
250
Featured
See All Featured
Code Review Best Practice
trishagee
74
20k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
240
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Exploring anti-patterns in Rails
aemeredith
2
290
The browser strikes back
jonoalderson
0
830
30 Presentation Tips
portentint
PRO
1
260
Building a Scalable Design System with Sketch
lauravandoore
463
34k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
77
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.4k
Navigating Weather and Climate Data
rabernat
0
140
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Designing for Timeless Needs
cassininazir
0
170
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]