SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
A Rubyist tries Angular
Chase Southard
KYJSUG | Sept. 2013
~ a 5 day journey ~
Thursday, September 26, 13
Thursday, September 26, 13
Thursday, September 26, 13
+
Thursday, September 26, 13
Thursday, September 26, 13
Black Box
Thursday, September 26, 13
Thursday, September 26, 13
Tonnage
https://github.com/chaserx/tonnage
Thursday, September 26, 13
Rails Model &
Controller
Thursday, September 26, 13
{ sublime }
Thursday, September 26, 13
.
!"" Gemfile
!"" Gemfile.lock
!"" README.rdoc
!"" Rakefile
!"" app
#   !"" assets
#   #   !"" images
#   #   !"" javascripts
#   #   #   !"" angular
#   #   #   #   !"" controllers
#   #   #   #   #   %"" weight_measurements_ctrl.js.coffee
#   #   #   #   !"" directives
#   #   #   #   %"" services
#   #   #   #   %"" weight_measurement.js.coffee
#   #   #   !"" app.js.coffee
#   #   #   !"" application.js
#   #   #   !"" home.js.coffee
#   #   #   %"" weight_measurements.js.coffee
#   #   %"" stylesheets
#   #   !"" application.css
#   #   !"" home.css.scss
#   #   %"" weight_measurements.css.scss
#   !"" controllers
#   #   !"" application_controller.rb
#   #   !"" concerns
#   #   !"" home_controller.rb
#   #   %"" weight_measurements_controller.rb
#   !"" helpers
#   #   !"" application_helper.rb
#   #   !"" home_helper.rb
#   #   %"" weight_measurements_helper.rb
#   !"" mailers
#   !"" models
#   #   !"" concerns
#   #   %"" weight_measurement.rb
#   %"" views
#   !"" home
#   #   %"" index.html.erb
#   !"" layouts
#   #   %"" application.html.erb
#   %"" weight_measurements
!"" bin
#   !"" bundle
#   !"" rails
#   %"" rake
!"" bower_components
#   %"" angular
#   !"" angular.js
#   !"" angular.min.js
#   %"" bower.json
!"" config
#   !"" application.rb
#   !"" boot.rb
#   !"" database.yml
#   !"" environment.rb
#   !"" environments
#   #   !"" development.rb
#   #   !"" production.rb
#   #   %"" test.rb
#   !"" initializers
#   #   !"" backtrace_silencers.rb
#   #   !"" filter_parameter_logging.rb
#   #   !"" inflections.rb
#   #   !"" mime_types.rb
#   #   !"" mime_types.rb
#   #   !"" secret_token.rb
#   #   !"" session_store.rb
#   #   %"" wrap_parameters.rb
#   !"" locales
#   #   %"" en.yml
#   %"" routes.rb
!"" config.ru
!"" db
#   !"" development.sqlite3
#   !"" migrate
#   #   %"" 20130923000919_create_weight_measurements.rb
#   !"" schema.rb
#   !"" seeds.rb
#   %"" test.sqlite3
!"" lib
#   !"" assets
#   %"" tasks
!"" log
#   !"" development.log
#   %"" test.log
!"" public
#   !"" 404.html
#   !"" 422.html
#   !"" 500.html
#   !"" assets
#   #   !"" application-1afffeb91436185f61c32d45639f5763.css
#   #   !"" application-1afffeb91436185f61c32d45639f5763.css.gz
#   #   !"" application-6b984b4c27cdb87e3c095018f44fa286.js
#   #   !"" application-6b984b4c27cdb87e3c095018f44fa286.js.gz
#   #   !"" application-9ace572d6e1deba06dd0c638399c3c2b.css
#   #   !"" application-9ace572d6e1deba06dd0c638399c3c2b.css.gz
#   #   %"" manifest-7b2fc84bf5424c2ee5d8cb0c099de0ae.json
#   !"" favicon.ico
#   %"" robots.txt
!"" test
#   !"" controllers
#   #   !"" home_controller_test.rb
#   #   %"" weight_measurements_controller_test.rb
#   !"" fixtures
#   #   %"" weight_measurements.yml
#   !"" helpers
#   #   !"" home_helper_test.rb
#   #   %"" weight_measurements_helper_test.rb
#   !"" integration
#   #   %"" api_weight_measurements_test.rb
#   !"" mailers
#   !"" models
#   #   %"" weight_measurement_test.rb
#   %"" test_helper.rb
!"" tmp
#   %"" cache
#   %"" assets
#   %"" development
#   !"" sass
#   #   %"" 5587ef5cc6602d32d8b402dd40e027111957c1c9
#   #   !"" home.css.scssc
#   #   %"" weight_measurements.css.scssc
#   %"" sprockets
#   !"" 01cb31ac38786ee5b727bfddccd0ad14
#   !"" 05d0795a34c03f1655eb8cfc49fb2eac
#   !"" 07846260088cbe378436f5992acb85f2
#   !"" 0c9f5a68e10c76b2d39acc37bb242e22
#   !"" 0e780da7cd1c4685dc103ad4b341cc37
#   !"" 10c7635fffba778e532bfed7cc4afffa
#   !"" 13fe41fee1fe35b49d145bcc06610705
Thursday, September 26, 13
!"" app
#   !"" assets
#   #   !"" images
#   #   !"" javascripts
#   #   #   !"" angular
#   #   #   #   !"" controllers
#   #   #   #   #   %"" weight_measurements_ctrl.js.coffee
#   #   #   #   !"" directives
#   #   #   #   %"" services
#   #   #   #   %"" weight_measurement.js.coffee
#   #   #   !"" app.js.coffee
#   #   #   !"" application.js
#   #   #   !"" home.js.coffee
#   #   #   %"" weight_measurements.js.coffee
#   #   %"" stylesheets
#   #   !"" application.css
#   #   !"" home.css.scss
#   #   %"" weight_measurements.css.scss
Thursday, September 26, 13
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.8/
angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular-
resource.min.js"></script>
<%= javascript_include_tag "application", "data-turbolinks-track" => true
%>
</body>
</html>
Thursday, September 26, 13
<div ng-controller="WeightMeasurementsCtrl">
<div class="row">
<div class="col-md-6 col-xs-6 col-sm-6">
<h1>{{message}}</h1>
</div>
</div>
<div class="row">
<div class="col-md-6 col-xs-6 col-sm-6">
<form ng-submit="addWeightMeasurement()"
class="form-inline" role="form">
<div class="form-group">
<input type="text" ng-
model="newWeightMeasurement.value" class="form-control"
placeholder="Enter current lbs">
</div>
<button type="submit" value="Add" class="btn btn-
default">Add</button>
</form>
</div>
</div>
Thursday, September 26, 13
<button type="submit" value="Add" class="btn btn-
default">Add</button>
</form>
</div>
</div>
<div class="row">&nbsp;</div>
<div class="row">
<div class="col-md-6 col-xs-6 col-sm-6">
<table class='table table-striped table-bordered'>
<th>Weight (lbs)</th>
<th>DateTime</th>
<tr ng-repeat="weight_measurement in
weight_measurements">
<td>{{weight_measurement.value}}</td>
<td>{{weight_measurement.created_at}}</td>
</tr>
</table>
</div>
</div>
</div>
Thursday, September 26, 13
App.controller 'WeightMeasurementsCtrl', ['$scope',
"WeightMeasurement", ($scope, WeightMeasurement) ->
$scope.message = "Hey there, slim! Weigh in."
$scope.weight_measurements = WeightMeasurement.query()
$scope.addWeightMeasurement = ->
weight_measurement =
WeightMeasurement.save($scope.newWeightMeasurement)
$scope.weight_measurements.push(weight_measurement)
$scope.newWeightMeasurement = {}
]
Thursday, September 26, 13
Resources
• http://railscasts.com/episodes/405-angularjs
• http://yoosuf.me/blog/angularjs-beginners-guide/
• http://coderberry.me/blog/2013/04/23/angularjs-on-rails-4-part-2/
• http://www.erikminkel.com/2013/09/01/twitter-bootstrap-3-in-a-rails-4-
application/
• https://github.com/Jaco-Pretorius/angular-rails/blob/master/app/assets/
javascripts/controllers/todo_controller.js
• http://angularjs.org/
Thursday, September 26, 13

Mais conteúdo relacionado

Mais procurados

Friday Sermon 24 June 1983 - ایمان افروز خطبہ جمعہ فرمودہ حضرت مرزا طاہر احمد...
Friday Sermon 24 June 1983 - ایمان افروز خطبہ جمعہ فرمودہ حضرت مرزا طاہر احمد...Friday Sermon 24 June 1983 - ایمان افروز خطبہ جمعہ فرمودہ حضرت مرزا طاہر احمد...
Friday Sermon 24 June 1983 - ایمان افروز خطبہ جمعہ فرمودہ حضرت مرزا طاہر احمد...muzaffertahir9
 
Organize your assets with Rails
Organize your assets with RailsOrganize your assets with Rails
Organize your assets with RailsSimon Courtois
 
CSS Workflow. Pre & Post
CSS Workflow. Pre & PostCSS Workflow. Pre & Post
CSS Workflow. Pre & PostAnton Dosov
 
Dla investor-presentation-march-2011
Dla investor-presentation-march-2011Dla investor-presentation-march-2011
Dla investor-presentation-march-2011Delta_Apparel
 
Web Components: What, Why, How, and When
Web Components: What, Why, How, and WhenWeb Components: What, Why, How, and When
Web Components: What, Why, How, and WhenPeter Gasston
 
Cheap frontend tricks
Cheap frontend tricksCheap frontend tricks
Cheap frontend tricksambiescent
 
Homework for french
Homework for frenchHomework for french
Homework for frenchka434306mhs
 
高専カンファレンス 014東京 予告編
高専カンファレンス 014東京 予告編高専カンファレンス 014東京 予告編
高専カンファレンス 014東京 予告編Kuniaki Igarashi
 
Reasons To Love Ruby
Reasons To Love RubyReasons To Love Ruby
Reasons To Love RubyBen Scheirman
 

Mais procurados (17)

Friday Sermon 24 June 1983 - ایمان افروز خطبہ جمعہ فرمودہ حضرت مرزا طاہر احمد...
Friday Sermon 24 June 1983 - ایمان افروز خطبہ جمعہ فرمودہ حضرت مرزا طاہر احمد...Friday Sermon 24 June 1983 - ایمان افروز خطبہ جمعہ فرمودہ حضرت مرزا طاہر احمد...
Friday Sermon 24 June 1983 - ایمان افروز خطبہ جمعہ فرمودہ حضرت مرزا طاہر احمد...
 
Resume
ResumeResume
Resume
 
Organize your assets with Rails
Organize your assets with RailsOrganize your assets with Rails
Organize your assets with Rails
 
CSS Workflow. Pre & Post
CSS Workflow. Pre & PostCSS Workflow. Pre & Post
CSS Workflow. Pre & Post
 
Prism vol.98
Prism vol.98Prism vol.98
Prism vol.98
 
Dla investor-presentation-march-2011
Dla investor-presentation-march-2011Dla investor-presentation-march-2011
Dla investor-presentation-march-2011
 
Web Components: What, Why, How, and When
Web Components: What, Why, How, and WhenWeb Components: What, Why, How, and When
Web Components: What, Why, How, and When
 
El tractor
El tractorEl tractor
El tractor
 
Cheap frontend tricks
Cheap frontend tricksCheap frontend tricks
Cheap frontend tricks
 
Homework for french
Homework for frenchHomework for french
Homework for french
 
Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021
 
Elisa Carter BIO
Elisa Carter BIOElisa Carter BIO
Elisa Carter BIO
 
Munne ki laash
Munne ki laashMunne ki laash
Munne ki laash
 
Java Course Day 21
Java Course Day 21Java Course Day 21
Java Course Day 21
 
高専カンファレンス 014東京 予告編
高専カンファレンス 014東京 予告編高専カンファレンス 014東京 予告編
高専カンファレンス 014東京 予告編
 
Brunch With Coffee
Brunch With CoffeeBrunch With Coffee
Brunch With Coffee
 
Reasons To Love Ruby
Reasons To Love RubyReasons To Love Ruby
Reasons To Love Ruby
 

Destaque

Destaque (12)

An Intro to AngularJS
An Intro to AngularJSAn Intro to AngularJS
An Intro to AngularJS
 
Node and SocketIO
Node and SocketIONode and SocketIO
Node and SocketIO
 
PhoneGap - JavaScript for Mobile Apps
PhoneGap - JavaScript for Mobile AppsPhoneGap - JavaScript for Mobile Apps
PhoneGap - JavaScript for Mobile Apps
 
Underscore and Backbone Models
Underscore and Backbone ModelsUnderscore and Backbone Models
Underscore and Backbone Models
 
mHealth regulations - Global efforts and readiness _White paper_DELL
mHealth regulations - Global efforts and readiness _White paper_DELLmHealth regulations - Global efforts and readiness _White paper_DELL
mHealth regulations - Global efforts and readiness _White paper_DELL
 
Xerox mac
Xerox macXerox mac
Xerox mac
 
Digital technologies are driving a new generation of telehealth_White paper_DELL
Digital technologies are driving a new generation of telehealth_White paper_DELLDigital technologies are driving a new generation of telehealth_White paper_DELL
Digital technologies are driving a new generation of telehealth_White paper_DELL
 
Mycv
MycvMycv
Mycv
 
Bizim canımız çağıl hocamıza gelsin
Bizim canımız çağıl hocamıza gelsinBizim canımız çağıl hocamıza gelsin
Bizim canımız çağıl hocamıza gelsin
 
East 55th & Euclid Avenue Crossroads Study Images
East 55th & Euclid Avenue Crossroads Study ImagesEast 55th & Euclid Avenue Crossroads Study Images
East 55th & Euclid Avenue Crossroads Study Images
 
JavaScript State of the Union - Jan 2013
JavaScript State of the Union - Jan 2013JavaScript State of the Union - Jan 2013
JavaScript State of the Union - Jan 2013
 
Gok turks
Gok turksGok turks
Gok turks
 

Semelhante a A Rubyist tries Angular in a 5 day journey

Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012
Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012 Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012
Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012 Hossam Karim
 
Evolving systems and the link to service orientation
Evolving systems and the link to service orientationEvolving systems and the link to service orientation
Evolving systems and the link to service orientationAngelo van der Sijpt
 
דיני עבודה טמל 21.10.14דוד בן הרויה
דיני עבודה טמל 21.10.14דוד בן הרויהדיני עבודה טמל 21.10.14דוד בן הרויה
דיני עבודה טמל 21.10.14דוד בן הרויהtal123456
 
CCM IDL, CORBA Component Model IDL
CCM IDL, CORBA Component Model IDLCCM IDL, CORBA Component Model IDL
CCM IDL, CORBA Component Model IDLEmmanuel Fuchs
 
WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010Julian Dolby
 
Apprentice Power-Point Presentation/What is Apprenticeship Recruitment
Apprentice Power-Point Presentation/What is Apprenticeship Recruitment Apprentice Power-Point Presentation/What is Apprenticeship Recruitment
Apprentice Power-Point Presentation/What is Apprenticeship Recruitment The Pathway Group
 
Social Media for Social Change
Social Media for Social ChangeSocial Media for Social Change
Social Media for Social ChangeSasha Gayatri
 
Social Media for Social Change
Social Media for Social ChangeSocial Media for Social Change
Social Media for Social Changesashagaya
 
Cloud Readiness Index 2011 by the Asia Cloud Computing Association
Cloud Readiness Index 2011 by the Asia Cloud Computing AssociationCloud Readiness Index 2011 by the Asia Cloud Computing Association
Cloud Readiness Index 2011 by the Asia Cloud Computing Associationaccacloud
 
What you need to know about NGSOC. Presented at #CSXAsia #ScavengerHunt about...
What you need to know about NGSOC. Presented at #CSXAsia #ScavengerHunt about...What you need to know about NGSOC. Presented at #CSXAsia #ScavengerHunt about...
What you need to know about NGSOC. Presented at #CSXAsia #ScavengerHunt about...Alan Yau Ti Dun
 
Julius Joseph-SAP BASIS Resume
Julius Joseph-SAP BASIS ResumeJulius Joseph-SAP BASIS Resume
Julius Joseph-SAP BASIS ResumeJulius Joseph
 
The Even Darker Art of Rails Engines (2009)
The Even Darker Art of Rails Engines (2009)The Even Darker Art of Rails Engines (2009)
The Even Darker Art of Rails Engines (2009)lazyatom
 

Semelhante a A Rubyist tries Angular in a 5 day journey (20)

Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012
Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012 Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012
Time Travel - Predicting the Future and Surviving a Parallel Universe - JDC2012
 
Evolving systems and the link to service orientation
Evolving systems and the link to service orientationEvolving systems and the link to service orientation
Evolving systems and the link to service orientation
 
דיני עבודה טמל 21.10.14דוד בן הרויה
דיני עבודה טמל 21.10.14דוד בן הרויהדיני עבודה טמל 21.10.14דוד בן הרויה
דיני עבודה טמל 21.10.14דוד בן הרויה
 
CCM IDL, CORBA Component Model IDL
CCM IDL, CORBA Component Model IDLCCM IDL, CORBA Component Model IDL
CCM IDL, CORBA Component Model IDL
 
AWS Elastic Beanstalk
AWS Elastic BeanstalkAWS Elastic Beanstalk
AWS Elastic Beanstalk
 
Device deployment
Device deploymentDevice deployment
Device deployment
 
WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010
 
Apprentice Power-Point Presentation/What is Apprenticeship Recruitment
Apprentice Power-Point Presentation/What is Apprenticeship Recruitment Apprentice Power-Point Presentation/What is Apprenticeship Recruitment
Apprentice Power-Point Presentation/What is Apprenticeship Recruitment
 
Social Media for Social Change
Social Media for Social ChangeSocial Media for Social Change
Social Media for Social Change
 
Social Media for Social Change
Social Media for Social ChangeSocial Media for Social Change
Social Media for Social Change
 
All about Apache ACE
All about Apache ACEAll about Apache ACE
All about Apache ACE
 
Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021
 
Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021
 
Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021
 
Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021
 
Cloud Readiness Index 2011 by the Asia Cloud Computing Association
Cloud Readiness Index 2011 by the Asia Cloud Computing AssociationCloud Readiness Index 2011 by the Asia Cloud Computing Association
Cloud Readiness Index 2011 by the Asia Cloud Computing Association
 
Improvement of defect record
Improvement of defect recordImprovement of defect record
Improvement of defect record
 
What you need to know about NGSOC. Presented at #CSXAsia #ScavengerHunt about...
What you need to know about NGSOC. Presented at #CSXAsia #ScavengerHunt about...What you need to know about NGSOC. Presented at #CSXAsia #ScavengerHunt about...
What you need to know about NGSOC. Presented at #CSXAsia #ScavengerHunt about...
 
Julius Joseph-SAP BASIS Resume
Julius Joseph-SAP BASIS ResumeJulius Joseph-SAP BASIS Resume
Julius Joseph-SAP BASIS Resume
 
The Even Darker Art of Rails Engines (2009)
The Even Darker Art of Rails Engines (2009)The Even Darker Art of Rails Engines (2009)
The Even Darker Art of Rails Engines (2009)
 

Último

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Último (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

A Rubyist tries Angular in a 5 day journey

  • 1. A Rubyist tries Angular Chase Southard KYJSUG | Sept. 2013 ~ a 5 day journey ~ Thursday, September 26, 13
  • 10. { sublime } Thursday, September 26, 13
  • 11. . !"" Gemfile !"" Gemfile.lock !"" README.rdoc !"" Rakefile !"" app #   !"" assets #   #   !"" images #   #   !"" javascripts #   #   #   !"" angular #   #   #   #   !"" controllers #   #   #   #   #   %"" weight_measurements_ctrl.js.coffee #   #   #   #   !"" directives #   #   #   #   %"" services #   #   #   #   %"" weight_measurement.js.coffee #   #   #   !"" app.js.coffee #   #   #   !"" application.js #   #   #   !"" home.js.coffee #   #   #   %"" weight_measurements.js.coffee #   #   %"" stylesheets #   #   !"" application.css #   #   !"" home.css.scss #   #   %"" weight_measurements.css.scss #   !"" controllers #   #   !"" application_controller.rb #   #   !"" concerns #   #   !"" home_controller.rb #   #   %"" weight_measurements_controller.rb #   !"" helpers #   #   !"" application_helper.rb #   #   !"" home_helper.rb #   #   %"" weight_measurements_helper.rb #   !"" mailers #   !"" models #   #   !"" concerns #   #   %"" weight_measurement.rb #   %"" views #   !"" home #   #   %"" index.html.erb #   !"" layouts #   #   %"" application.html.erb #   %"" weight_measurements !"" bin #   !"" bundle #   !"" rails #   %"" rake !"" bower_components #   %"" angular #   !"" angular.js #   !"" angular.min.js #   %"" bower.json !"" config #   !"" application.rb #   !"" boot.rb #   !"" database.yml #   !"" environment.rb #   !"" environments #   #   !"" development.rb #   #   !"" production.rb #   #   %"" test.rb #   !"" initializers #   #   !"" backtrace_silencers.rb #   #   !"" filter_parameter_logging.rb #   #   !"" inflections.rb #   #   !"" mime_types.rb #   #   !"" mime_types.rb #   #   !"" secret_token.rb #   #   !"" session_store.rb #   #   %"" wrap_parameters.rb #   !"" locales #   #   %"" en.yml #   %"" routes.rb !"" config.ru !"" db #   !"" development.sqlite3 #   !"" migrate #   #   %"" 20130923000919_create_weight_measurements.rb #   !"" schema.rb #   !"" seeds.rb #   %"" test.sqlite3 !"" lib #   !"" assets #   %"" tasks !"" log #   !"" development.log #   %"" test.log !"" public #   !"" 404.html #   !"" 422.html #   !"" 500.html #   !"" assets #   #   !"" application-1afffeb91436185f61c32d45639f5763.css #   #   !"" application-1afffeb91436185f61c32d45639f5763.css.gz #   #   !"" application-6b984b4c27cdb87e3c095018f44fa286.js #   #   !"" application-6b984b4c27cdb87e3c095018f44fa286.js.gz #   #   !"" application-9ace572d6e1deba06dd0c638399c3c2b.css #   #   !"" application-9ace572d6e1deba06dd0c638399c3c2b.css.gz #   #   %"" manifest-7b2fc84bf5424c2ee5d8cb0c099de0ae.json #   !"" favicon.ico #   %"" robots.txt !"" test #   !"" controllers #   #   !"" home_controller_test.rb #   #   %"" weight_measurements_controller_test.rb #   !"" fixtures #   #   %"" weight_measurements.yml #   !"" helpers #   #   !"" home_helper_test.rb #   #   %"" weight_measurements_helper_test.rb #   !"" integration #   #   %"" api_weight_measurements_test.rb #   !"" mailers #   !"" models #   #   %"" weight_measurement_test.rb #   %"" test_helper.rb !"" tmp #   %"" cache #   %"" assets #   %"" development #   !"" sass #   #   %"" 5587ef5cc6602d32d8b402dd40e027111957c1c9 #   #   !"" home.css.scssc #   #   %"" weight_measurements.css.scssc #   %"" sprockets #   !"" 01cb31ac38786ee5b727bfddccd0ad14 #   !"" 05d0795a34c03f1655eb8cfc49fb2eac #   !"" 07846260088cbe378436f5992acb85f2 #   !"" 0c9f5a68e10c76b2d39acc37bb242e22 #   !"" 0e780da7cd1c4685dc103ad4b341cc37 #   !"" 10c7635fffba778e532bfed7cc4afffa #   !"" 13fe41fee1fe35b49d145bcc06610705 Thursday, September 26, 13
  • 12. !"" app #   !"" assets #   #   !"" images #   #   !"" javascripts #   #   #   !"" angular #   #   #   #   !"" controllers #   #   #   #   #   %"" weight_measurements_ctrl.js.coffee #   #   #   #   !"" directives #   #   #   #   %"" services #   #   #   #   %"" weight_measurement.js.coffee #   #   #   !"" app.js.coffee #   #   #   !"" application.js #   #   #   !"" home.js.coffee #   #   #   %"" weight_measurements.js.coffee #   #   %"" stylesheets #   #   !"" application.css #   #   !"" home.css.scss #   #   %"" weight_measurements.css.scss Thursday, September 26, 13
  • 14. <div ng-controller="WeightMeasurementsCtrl"> <div class="row"> <div class="col-md-6 col-xs-6 col-sm-6"> <h1>{{message}}</h1> </div> </div> <div class="row"> <div class="col-md-6 col-xs-6 col-sm-6"> <form ng-submit="addWeightMeasurement()" class="form-inline" role="form"> <div class="form-group"> <input type="text" ng- model="newWeightMeasurement.value" class="form-control" placeholder="Enter current lbs"> </div> <button type="submit" value="Add" class="btn btn- default">Add</button> </form> </div> </div> Thursday, September 26, 13
  • 15. <button type="submit" value="Add" class="btn btn- default">Add</button> </form> </div> </div> <div class="row">&nbsp;</div> <div class="row"> <div class="col-md-6 col-xs-6 col-sm-6"> <table class='table table-striped table-bordered'> <th>Weight (lbs)</th> <th>DateTime</th> <tr ng-repeat="weight_measurement in weight_measurements"> <td>{{weight_measurement.value}}</td> <td>{{weight_measurement.created_at}}</td> </tr> </table> </div> </div> </div> Thursday, September 26, 13
  • 16. App.controller 'WeightMeasurementsCtrl', ['$scope', "WeightMeasurement", ($scope, WeightMeasurement) -> $scope.message = "Hey there, slim! Weigh in." $scope.weight_measurements = WeightMeasurement.query() $scope.addWeightMeasurement = -> weight_measurement = WeightMeasurement.save($scope.newWeightMeasurement) $scope.weight_measurements.push(weight_measurement) $scope.newWeightMeasurement = {} ] Thursday, September 26, 13
  • 17. Resources • http://railscasts.com/episodes/405-angularjs • http://yoosuf.me/blog/angularjs-beginners-guide/ • http://coderberry.me/blog/2013/04/23/angularjs-on-rails-4-part-2/ • http://www.erikminkel.com/2013/09/01/twitter-bootstrap-3-in-a-rails-4- application/ • https://github.com/Jaco-Pretorius/angular-rails/blob/master/app/assets/ javascripts/controllers/todo_controller.js • http://angularjs.org/ Thursday, September 26, 13