Skip to main content

ANGULARJS INTERVIEW QUESTIONS & ANSWERS

1) What is AngularJS?
AngularJS is a javascript framework used for creating single web page applications. It allows you to use HTML as your template language and enables you to extend HTML’s syntax to express your application’s components clearly
2) Explain what are the key features of AngularJS ?
The key features of AngularJS are
  • Scope
  • Controller
  • Model
  • View
  • Services
  • Data Binding
  • Directives
  • Filters
  • Testable
3) Explain what is scope in AngularJS ?
Scope refers to the application model, it acts like glue between application controller and the view. Scopes are arranged in hierarchical structure and impersonate the DOM ( Document Object Model) structure of the application. It can watch expressions and propagate events.
4) Explain what is services in AngularJS ?
In AngularJS services are the singleton objects or functions that are used for carrying out specific tasks. It holds some business logic and these function can be called as controllers, directive, filters and so on.
5) Explain what is Angular Expression? Explain what is key difference between angular expressions and JavaScript expressions?
Like JavaScript, Angular expressions are code snippets that are usually placed in binding such as {{ expression }}
The key difference between the JavaScript expressions and Angular expressions
  • Context : In Angular, the expressions are evaluated against a scope object, while the Javascript expressions are evaluated against the global window
  • Forgiving: In Angular expression evaluation is forgiving to null and undefined, while in Javascript undefined properties generates TypeError or ReferenceError
  • No Control Flow Statements: Loops, conditionals or exceptions cannot be used in an angular expression
  • Filters: To format data before displaying it you can use filters
6) With options on page load how you can initialize a select box ?
You can initialize a select box with options on page load by using ng-init directive
  • <div ng-controller = “ apps/dashboard/account ” ng-switch
  • On = “! ! accounts” ng-init = “ loadData ( ) ”>
7) Explain what are directives ? Mention some of the most commonly used directives in AngularJS application ?
A directive is something that introduces new syntax, they are like markers on DOM element which attaches a special behavior to it. In any AngularJS application, directives are the most important components.
Some of the commonly used directives are ng-model, ng-App, ng-bind, ng-repeat , ng-show etc.
8) Mention what are the advantages of using AngularJS ?
AngularJS has several advantages in web development.
  • AngularJS supports MVC pattern
  • Can do two ways data binding using AngularJS
  • It has per-defined form validations
  • It supports both client server communication
  • It supports animations
9) Explain what AngularJS routes does ?
Angularjs routes enable you to create different URLs for different content in your application. Different URLs for different content enables user to bookmark URLs to specific content. Each such bookmarkable URL in AngularJS is called a route
A value in AngularJS is a simple object. It can be a number, string or JavaScript object. Values are typically used as configuration injected into factories, services or controllers. A value should be belong to an AngularJS module.
Injecting a value into an AngularJS controller function is done by adding a parameter with the same name as the value
10) Explain what is data binding in AngularJS ?
Automatic synchronization of data between the model and view components is referred as data binding in AngularJS. There are two ways for data binding
1.    Data mining in classical template systems
2.    Data binding in angular templates

Comments

Popular posts from this blog

CCNA INTERVIEW QUESTIONS & ANSWERS

1. What is routing? Routing is the process of finding a path on which data can pass from source to destination. Routing is done by a device called routers, which are network layer devices. 2. What is the purpose of data link? The job of the data link layer is to check messages are sent to the right device . Another function of this layer is framing. 3. What are the key advantages of using switches? When a switch receives a signal, it creates a frame out of the bits that can be extracted from that signal. With this process , it gains access and reads the destination address, after which it forwards that frame to the appropriate port. This is a very efficient means of data transmission, instead of broadcasting it on all ports. 4. When does network congestion occur? Network congestion occurs when too many users are typing to use the same bandwidth. This is especially true in big networks that do not resort to network segmentation. 5. Does a bridge ...

10 REASONS TO USE NODE.JS

1. Node.js is a Ubiquitous Runtime JavaScript is a decent spot to begin for new designers, and remains the dialect of decision for some prepared engineers. What's more, however the dialect has been around for quite a while and put in a couple of years grieving during the 90s and mid 2000s, as intrigue extended, JavaScript has developed and added highlights thought about basic to present day programming dialects. What's more, similarly as with any great dialect, it is basic and open enough for anybody to begin with, yet ground-breaking enough that even old hands find new things to learn and outfit for their work. You may as of now be utilizing a rich customer structure, for example, (Angular, Ember, Backbone) and a RESTful server-side API that vans JSON forward and backward. Regardless of whether you're not utilizing one of those systems, you've composed your own in jQuery or Vanilla JavaScript. So in the event that you're not utilizing Node.js on the serv...

What is Content Writing? For what reason is it Important in SEO?

Along these lines, content writing – the expert in advanced advertising and SEO ; you should have likewise run over the expression 'Quality written substance is the final deciding factor', and it's appropriately said. The entire computerized showcasing and website streamlining would not be conceivable with an extraordinary substance that clings to the SEO rules. Content writing is a type of web based composition which is basically utilized for computerized advertising efforts. This incorporates a wide scope of specialties territories, for example, article composing, online journals , item portrayals, bulletins, points of arrival, internet based life substance, emailers, and that's just the beginning. Content composing additionally varies dependent on the business, however paying little mind to the business, each organization must contract content essayists who are likewise proficient bloggers. Online journals are an incredible channel to draw in rush ho...