AngularJS is an up-and-coming JavaScript framework supported and maintained by Google. Over the past year, usage for the framework has exploded, giving many developers reason to believe it's the next big thing. In this presentation by Angular developer Sarah Hudson, you will learn the basics of what Angular is and what it can do for your projects, as well as breaking down the components of Angular, what makes it unique, and how it gives developers more control over custom templates and elements.
Sections include:
• Core structure and components of Angular, such as custom directives, factories for sharing data, two-way binding, and modules
• Companion libraries to Angular, such as the popular AngularUI suite which includes UI-Bootstrap
• A brief overview of routing options from Angular's native routing to UI Router, and how it offers flexibility for your apps
Introduction to AngularJS
مقدمة عن AngularJS
Follow us on Egyptian NodeJs Community on google+
https://plus.google.com/u/0/communities/110403046378899425503
We Will learn about:
What is AngularJs?
Key Points
Core Features of AngularJS
How is it works?
AngularJs Terminologies
AngularJs directives
How we start work on AngularJs?
AngularJs Tags
How we use Yeoman?
Advantages and Disadvantages
Introduction to AngularJS
مقدمة عن AngularJS
Follow us on Egyptian NodeJs Community on google+
https://plus.google.com/u/0/communities/110403046378899425503
We Will learn about:
What is AngularJs?
Key Points
Core Features of AngularJS
How is it works?
AngularJs Terminologies
AngularJs directives
How we start work on AngularJs?
AngularJs Tags
How we use Yeoman?
Advantages and Disadvantages
A Basic tutorial for AngularJS basic features with examples:
2 way data binding
directives
Filters
Views
Providers
Routing
Examples of this presentation can be found here :
https://github.com/msalahat/AngularJS-1.3-Basic-Tutorial#angularjs-13-basic-tutorial
This is an effort towards teaching Angular JS from what an average Javascript developer already know. The presentation tries to fill the gap rather than posing Angular as a magical framework.
Introduction to Angular js , Angular js PDF , What is angular js ?? angular js pdf explanied. introduction to angular js. angular js online slide presentations. angular js explained pdf introductions
AngularJS 101 - Everything you need to know to get startedStéphane Bégaudeau
In this presentation, you will find everything need to get started with AngularJS.
For more details, have a look at my blog (http://stephanebegaudeau.tumblr.com) or follow me on twitter (@sbegaudeau)
Agenda:
1- Introduction: basic description and overview about what is angular and why we should use it.
2- AngularJS Core Features: key features of angularJS.
3- Guides and help: API and documentation references, in addition of online courses.
On September 25th we hosted a webinar on “Step by Step AngularJS for beginners” for the Indian region and we’d like to share the presentation and recorded webinar with you now! In the webinar, we covered:
• Introduction to AngularJS
• Introduction to SPA
• Controller and $scope object
• Controller hierarchy
• Service and factory methods
• Routing
• CRUD operations in AngularJS application
And more!
AngularJS - What is it & Why is it awesome ? (with demos)Gary Arora
AngularJS - What is it & Why is it awesome! A quick introduction to AngularJS, its features and some demos. This deck was part of Gary Arora's presentation for the Boston Code Mastery event in December 2013.
Angular Js Get Started - Complete CourseEPAM Systems
Angular Js Advantages.Developed by Google - Most Popular, SPA (Single Page Appplications), Data Binding, Easy to Test.
Complete guide for Angular Js. Covers Basics of Angular - Module, Controllers, Filters, and Advanced topics Routing, Services, UI-Routing
A Basic tutorial for AngularJS basic features with examples:
2 way data binding
directives
Filters
Views
Providers
Routing
Examples of this presentation can be found here :
https://github.com/msalahat/AngularJS-1.3-Basic-Tutorial#angularjs-13-basic-tutorial
This is an effort towards teaching Angular JS from what an average Javascript developer already know. The presentation tries to fill the gap rather than posing Angular as a magical framework.
Introduction to Angular js , Angular js PDF , What is angular js ?? angular js pdf explanied. introduction to angular js. angular js online slide presentations. angular js explained pdf introductions
AngularJS 101 - Everything you need to know to get startedStéphane Bégaudeau
In this presentation, you will find everything need to get started with AngularJS.
For more details, have a look at my blog (http://stephanebegaudeau.tumblr.com) or follow me on twitter (@sbegaudeau)
Agenda:
1- Introduction: basic description and overview about what is angular and why we should use it.
2- AngularJS Core Features: key features of angularJS.
3- Guides and help: API and documentation references, in addition of online courses.
On September 25th we hosted a webinar on “Step by Step AngularJS for beginners” for the Indian region and we’d like to share the presentation and recorded webinar with you now! In the webinar, we covered:
• Introduction to AngularJS
• Introduction to SPA
• Controller and $scope object
• Controller hierarchy
• Service and factory methods
• Routing
• CRUD operations in AngularJS application
And more!
AngularJS - What is it & Why is it awesome ? (with demos)Gary Arora
AngularJS - What is it & Why is it awesome! A quick introduction to AngularJS, its features and some demos. This deck was part of Gary Arora's presentation for the Boston Code Mastery event in December 2013.
Angular Js Get Started - Complete CourseEPAM Systems
Angular Js Advantages.Developed by Google - Most Popular, SPA (Single Page Appplications), Data Binding, Easy to Test.
Complete guide for Angular Js. Covers Basics of Angular - Module, Controllers, Filters, and Advanced topics Routing, Services, UI-Routing
Angular js interview question answer for fresherRavi Bhadauria
AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Angular's data binding and dependency injection eliminate much of the code you would otherwise have to write. And it all happens within the browser, making it an ideal partner with any server technology.
Introduction to AngularJS By Bharat MakwanaBharat Makwana
In this presentation, you will find everything need to get started with AngularJS. We will walk through with architecture, core features, detailing of features.
A complete crash course with 7 pratical labs, to have a head start developing single page applications with Angular. It also contains advanced topics, like Transclusion, Directive to directive communication and UI Router.
High Quality presentation: https://goo.gl/3OwQXf
Download Labs: https://goo.gl/cVI6De
This presentation has been prepared by Oleksii Prohonnyi for internal Angular.js training to improve skills of newbies in JS/Angular.
Part 2 (Architecture): http://www.slideshare.net/oprohonnyi/dive-into-angular-part-2-architecture
Part 3 (Performance): http://www.slideshare.net/oprohonnyi/dive-into-angular-part-3-performance
Part 4 (Angular 2.0): http://www.slideshare.net/oprohonnyi/dive-into-angular-part-4-angular-20
Part 5 (Experience): https://www.slideshare.net/oprohonnyi/dive-into-angular-part-5-experience
Introduction to AngularJS - 'Up and Running With Front End Web Development' course at VAMK (Vaasa University of Applied Science).
Code samples are in the notes alongside each slide, so download the file in case you want to check them.
AngularJS Is a client-side MVC JavaScript framework for writing single page web applications(SPA). It's built and mantained by Google. It helps you to build testable web applications that can be scale. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. The unique and innovative features are two-way-data bindings, dependency injection, easy-to-test code and extending the HTML dialect by using directives.
AI Genie Review: World’s First Open AI WordPress Website CreatorGoogle
AI Genie Review: World’s First Open AI WordPress Website Creator
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-genie-review
AI Genie Review: Key Features
✅Creates Limitless Real-Time Unique Content, auto-publishing Posts, Pages & Images directly from Chat GPT & Open AI on WordPress in any Niche
✅First & Only Google Bard Approved Software That Publishes 100% Original, SEO Friendly Content using Open AI
✅Publish Automated Posts and Pages using AI Genie directly on Your website
✅50 DFY Websites Included Without Adding Any Images, Content Or Doing Anything Yourself
✅Integrated Chat GPT Bot gives Instant Answers on Your Website to Visitors
✅Just Enter the title, and your Content for Pages and Posts will be ready on your website
✅Automatically insert visually appealing images into posts based on keywords and titles.
✅Choose the temperature of the content and control its randomness.
✅Control the length of the content to be generated.
✅Never Worry About Paying Huge Money Monthly To Top Content Creation Platforms
✅100% Easy-to-Use, Newbie-Friendly Technology
✅30-Days Money-Back Guarantee
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIGenieApp #AIGenieBonus #AIGenieBonuses #AIGenieDemo #AIGenieDownload #AIGenieLegit #AIGenieLiveDemo #AIGenieOTO #AIGeniePreview #AIGenieReview #AIGenieReviewandBonus #AIGenieScamorLegit #AIGenieSoftware #AIGenieUpgrades #AIGenieUpsells #HowDoesAlGenie #HowtoBuyAIGenie #HowtoMakeMoneywithAIGenie #MakeMoneyOnline #MakeMoneywithAIGenie
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Do you want Software for your Business? Visit Deuglo
Deuglo has top Software Developers in India. They are experts in software development and help design and create custom Software solutions.
Deuglo follows seven steps methods for delivering their services to their customers. They called it the Software development life cycle process (SDLC).
Requirement — Collecting the Requirements is the first Phase in the SSLC process.
Feasibility Study — after completing the requirement process they move to the design phase.
Design — in this phase, they start designing the software.
Coding — when designing is completed, the developers start coding for the software.
Testing — in this phase when the coding of the software is done the testing team will start testing.
Installation — after completion of testing, the application opens to the live server and launches!
Maintenance — after completing the software development, customers start using the software.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Launch Your Streaming Platforms in MinutesRoshan Dwivedi
The claim of launching a streaming platform in minutes might be a bit of an exaggeration, but there are services that can significantly streamline the process. Here's a breakdown:
Pros of Speedy Streaming Platform Launch Services:
No coding required: These services often use drag-and-drop interfaces or pre-built templates, eliminating the need for programming knowledge.
Faster setup: Compared to building from scratch, these platforms can get you up and running much quicker.
All-in-one solutions: Many services offer features like content management systems (CMS), video players, and monetization tools, reducing the need for multiple integrations.
Things to Consider:
Limited customization: These platforms may offer less flexibility in design and functionality compared to custom-built solutions.
Scalability: As your audience grows, you might need to upgrade to a more robust platform or encounter limitations with the "quick launch" option.
Features: Carefully evaluate which features are included and if they meet your specific needs (e.g., live streaming, subscription options).
Examples of Services for Launching Streaming Platforms:
Muvi [muvi com]
Uscreen [usencreen tv]
Alternatives to Consider:
Existing Streaming platforms: Platforms like YouTube or Twitch might be suitable for basic streaming needs, though monetization options might be limited.
Custom Development: While more time-consuming, custom development offers the most control and flexibility for your platform.
Overall, launching a streaming platform in minutes might not be entirely realistic, but these services can significantly speed up the process compared to building from scratch. Carefully consider your needs and budget when choosing the best option for you.
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
3. What is AngularJS?
● AngularJS is an MVC framework for web apps,
allowing devs to use only HTML, CSS, and JavaScript
on the front-end.
● It is maintained and supported by Google
● Searches for AngularJS have shot up over the past
year, indicating that it's the next big thing in the JS
and front-end world
● Alternatives: Knockout, Ember, Backbone
4. Why Angular?
● Create custom HTML elements through directives, allowing further
manipulation of the DOM
o ex: Tags <dropdown></dropdown> can be used for a custom dropdown,
pulling from a template.html file for a reusable dropdown
● Layered on top of jQlite instead of jQuery - lighter weight code and less lines of
code for faster, more efficient load
● Flexible - Angular puts you in control of HTML elements and how it interfaces
with JS and the back end
● HTML5 Hybrid Mobile Apps can be built using AngularJS
● Modular, meaning that it’s more geared towards modules of code that you can
save in one file and reuse again and again throughout your app
5. Basic Components of Angular
● Expressions - One of the most basic components of Angular. Expressions allow you to
evaluate calculations or variables and print data on the view. They are typically
surrounded by double curly braces {{5 + 5}}, though you can also use ng-bind
● Directives - Allow you to extend native HTML elements and write your own HTML tags
and attributes. With directives, you can create a descriptive tag for easier, faster
readability and store a regularly used piece of code in one file.
● Controllers - JavaScript functions that allow you to access and manipulate data. You can
have one controller per page or multiple controllers for separate sections of the page.
● Views - The templates used for your web pages.
● Scope - Context where data & values are stored so that all components have access to it.
This is how you can display data on your views and send data from user input on your
view.
● Filters - JavaScript functions that format data. Angular ships with several built-in filters,
such as date, limitTo, orderBy, and currency
6. Basic Components of Angular (cont.)
● Factories and Services - JavaScript code that is independent of controllers and views.
Typically, these are functions that return data to share among different sections of your
app.
● Modules - The components of your Angular app, such as directives, controllers, and
services. However, modules can also be thought of as different sections of your app
separated out for improved readability and organization.
● Dependency Injection - The way that an Angular controller is made aware of a service or
factory that will be used.
7. Native Routing w/ AngularJS
● Uses the $locationProvider service for the configuration module
● To use, must inject ngRoute service into your angular module (i.e.,
angular.module(‘myApp’, [‘ngRoute’])
● Routes are one level deep, meaning that you can have /client={{clientId}} but not
/client/{{clientId}}
● View is loaded into the ng-view directive: <ng-view></ng-view>
● Links are determined by what mode you’re running your app in:
o Hashbang mode is the default for Angular. This appends a hash symbol to your
routes: <a href=“#/home”>Home</a> or <a href=“#!/home”>Home</a>. Using a
suffix (such as the ! symbol) is good for SEO.
o HTML5 mode prettifies your URIs: <a href=“/home”>Home</a>
o For SEO purposes, you may need to run a headless WebKit scriptable such as
PhantomJS
● To access your $route options and parameters in your controllers, you can pass in these
services: $route, $routeParams, and $location
9. Generating Angular Files
Simple: Include a link to the Angular library in the head of your HTML
and set up the JS file and declare ng-app yourself.
Advanced: Use an NPM package to scaffold a local development
environment along with the basic files necessary for an Angular
app. I use Yeoman.io, which packages Yo, Bower, and Grunt.
Yo - Automagically generates common files (like Bootstrap CSS files and JS
libraries like Angular)
Bower - Dependency Management (This means you can pull files and packages
from github, like Angular UI, and automatically declare them as dependent
packages in your angular app so angular “sees” them)
Grunt - Server, Testing, and Automated Task Running (unit tests, minification,
compilation)
11. A Word on Scope
● Scope is used to determine where a variable will be
accessible in your app.
● In Angular, each controller creates its own scope, meaning a
scope variable is only good in that controller or child
controllers
● Some views can have multiple controllers or multiple scopes
- you can access a variable across scopes using $rootScope
o Note: The “Angular way” to share a variable or piece of
data across controllers is actually to use factories and
services
12. A Word on Scope (cont)
● When you declare a variable in your controller, you can use a
local variable only viewable by the controller (var testVar) or
a $scope variable, which the front end can display
($scope.testVar)
● To display $scope variables, use double curly braces in your
HTML ({{}}) or use ng-bind (<span ng-bind=”
testVar”></span>
● Some devs prefer ng-bind because of a “blink and flash” -
this can also be solved by preventing the page from loading
before the data comes in
13. Two Way Binding
Angular does something cool with $scope variables - two way binding.This means that every
instance of a variable is updated as the value is manipulated - in other words, updating one
triggers a refresh of the DOM. Example:
<h1>Hello, {{contact.name}}!</h1>
<input type=“text” ng-model=“contact.name” />
The above code will update the heading as a user changes the value in the text field.
Angular has event listeners on the ng-model directive which watch for changes. As soon as a
change is detected, then it fires off a function which alerts the other instances bound to the
model that the value has changed and to update their values
15. Native Directives
Angular ships with native directives for structure. These directives are restricted as HTML attributes:
● ng-app: Declares your app on the view and binds it to an angular module. You can only have
one ng-app directive per view.
● ng-controller: Sections off pieces of the HTML and binds them to a controller. Unless nested,
controllers each have their own scope so if you want to share data between controllers you have
to use:
o A factory or a service
o Dependency injection to pass in a parameter or use a resolve
o sessionStorage or localStorage
o $rootScope
● ng-model: Way of wiring input elements to your controller and/or items on your view for “two
way binding.” Ng-model shares data from the view to the controller and vice versa.
● ng-click: Runs whatever expression or function you set on an HTML tag. I.e., <button
type=“button” ng-click=“submit(order)”>Submit</button>
16. Native Directives (cont)
● ng-class: Set dynamic classes based on flags.
<button ng-class=“{‘red’: clicked===true, ‘blue’: clicked!==true}” ng-click=“
clicked=!clicked”>Click Me!</button>
● ng-style: Used to dynamically change style of an element.
<p ng-style=“{‘color’: changeColor}”>Hello, World!</p>
<button type=“button” ng-click=“changeColor=‘red’”>Change Color</button>
● ng-repeat: Used to iterate through an array or an object.
<ul>
<li ng-repeat=“product in products”>
{{product.name}} - {{product.price | currency: “USD$”}}
</li>
</ul>
18. Breaking down a directive (cont.)
Directives come with a number of options you can set.
● Restrict: This option indicates how the directive will be declared in HTML.
o E: Element. <my-customer></my-customer>
o A: Attribute. <div my-customer></div>
o C: Class name. <div class=”my-customer”></div>
o M: Comment <!-- directive: my-customer -->
● Transclude: If set to true, gives the template access to the parent scope and allows
template to wrap content set from the parent scope. Good for wrapping arbitrary
content.
● Template/TemplateUrl: If your template is small, then you can write the HTML in
the directive using template. Otherwise, use templateURL to link to an HTML file.
19. Breaking down a directive (cont.)
● Scope: Determines whether the scope is a shared scope, a new scope, or an isolate
scope.
o If scope is set to true, then will create only one new scope for the directive
regardless of how many instances appear on the page.
o If you set an isolate scope using an object hash, then the directive won’t have
access to the scope of the page’s controller, allowing one to manipulate data without
compromising its integrity on the page.
○ You can pass in data into or out of a directive that uses isolate scope by using local
scope properties:
■ “=”: Two way binding between local scope property and parent scope property
of the same name.
■ “@”: Reads the value passed in.
■ “&”: Allows an external function or expression to be passed into the directive
20. Breaking down a directive (cont.)
● Scope (cont): Example in action where $scope.naomi is equal to an object and the
myCustomer directive prints out the customer object passed to it from an outside
controller.
<my-customer info="naomi"></my-customer>
.directive('myCustomer', function() {
return {
restrict: 'E',
scope: {
customerInfo: '=info'
},
templateUrl: 'my-customer-plus-vojta.html'
};
});
21. Breaking down a directive (cont.)
● Require: If another directive is required as a parent, then declare the name in the
required option.
● Controller: Used in nested directives; declares the controller the directive will use.
● Link: Function that allows directive to manipulate the DOM. Example:
link: function(scope, element, attrs){
element.bind(‘click’, function(){
element.html(‘Clicked!’);
})
}
23. Factories and Services
● Factories and services are blocks of code in JS files that allow you to share data or
functions between controllers - in other words, between scopes
● Services shipped with Angular include: $scope, $http, $window, and $route
● Preferred to $rootScope because of modular nature
● Factories are functions that return an object - and this object will contain data
needed for the controller to access. For an example of how this might look:
.factory(“MyFactory”, function(){
var testVar = “Hello, World!”
return {
myToken: function(){
return testVar;
} //end inner function
} //end 1st return
}]) //end factory
.controller(“MainCtrl”, function($scope,
MyFactory){
$scope.myVar = MyFactory.myToken();
}) //in the view {{myVar}} displays “Hello, World!”
25. Dependency Injection
● A core aspect of services and factories is dependency
injection. Inject the services you want available in a
controller to access them.
.controller(‘MainCtrl’, [‘$scope’,
function($scope){ }])
o The square brackets are for minification so it remembers the
service’s name
27. What is Angular UI?
Angular UI is the companion suite to AngularJS. Written by the
online AngularJS community, the files fill gaps in AngularJS and
provide even more flexibility. Angular UI includes:
● UI Router: for use instead of Angular’s native router to allow for
nested states
● UI Utils: Described as the Swiss Army Knife of Angular UI, UI
Utilities include things such as event binders, jQuery
passthrough, keypress, route checking, and infinite scroll
● UI Bootstrap: Taking Twitter Bootstrap’s jQuery driven
components and replacing them with Angular versions.
28. Routing with UI Router
● Uses concept of states instead of routes
o Uses $stateProvider service
o To use, must inject ui.router when declaring your angular module. (I.e.,
angular.module(‘myApp’, [‘ui.router’])
● Allows for nested states, so you can have multiple paths and nested views from a parent
state
o ex: /clients/{{clientId}}/overview is a nested state of /clients/{{clientId}}
o Can have more than one nested state - you can go as shallow or deep as you like
● View is loaded into a container with the ui-view directive: <div ui-view></div>
o If you’re using nested views, their templates must be passed in through the views
option in the routing config; whatever name you choose in the config must be
passed into the directive like so: <div ui-view=“content”></div>
● Links use ui-sref directive <a href ui-sref=“home”>Home</a>
● Can also link using Angular URL <a href=“#/home”>Home</a>
● To access states in controllers, inject the $state service
30. UI Bootstrap
Set of templates (HTML & JS directives) that make up common UI
elements, such as:
● Accordions
● Carousel
● Datepicker
● Dropdown
● Modal Windows
● Pagination
● Pop-overs
● Progress Bar
● Tooltips
31. UI Bootstrap (cont)
Let’s take a look at what UI Bootstrap has to
offer: http://angular-ui.github.io/bootstrap
Play with the demos and get a real feel of how
Angular can transform your front end.
33. Sites that use Angular
1. Video Upload: http://www.vevo.com/
2. Email Reminders: http://reme.io/
3. Conference Calls: https://confr.com/#!/
4. Social Recommendations for Travel: http://posse.com/
5. News: http://www.msnbc.com/
6. Game: http://clickortre.at/#/
7. Plan Travel Itinerary: http://mywanderlust.co/
You can check out more sites at https://builtwith.angularjs.org/
34. Further Resources
● W3Schools Angular tutorial: http://www.w3schools.com/angular/
● Angular video tutorials: https://egghead.io/
● Angular’s official site with tutorials and documentation:
https://angularjs.org/
● AngularJS Learning GitHub:
https://github.com/jmcunningham/AngularJS-Learning
● Scotch.io: http://scotch.io/
● ng-newsletter: http://www.ng-newsletter.com/
● Dan Wahlin’s Blog:
http://weblogs.asp.net/dwahlin/Tags/AngularJS