Wednesday 14 December 2016

AngularJs - Done


AngularJS
What is a SPA?
Single page application (SPA) is a web application that fits on a single page. All your code (JS, HTML, CSS) is recovered with a single page stack. Further more, route between pages performed without invigorating the entire page.
Advantages of SPA:
1.No page flicker. Native application feel.
2.Client side routing and data rendering on client side.
3.Data is from server is in JSON format.
Coming to the questions
1.Why angular is called a single page application?
Answer: Angular Js is full featured SPA framework,with the help of which single page application is created. In the SPA whole page is not reloaded every time,every time view will be change
So when you load the application for the first time not all the pages from the server will be rendered..Its only index.html that loads when you load the application.Since only single page is loaded it is called as SPA
2.Even if the url changes in angular site will it be called as spa?
Answer:Basically url changes are done through routing. Routing in AngularJS is implemented by including <ng-view> or <ui-view> in your index.html page with out refreshing the entire page
So when the url changes it not the entire index.html that changes , only part of the html in ng-view or ui-view is switched between views
3.Is all the site created using angular are really a single page application? If not why?
Answer:Yes. All the sites created with angular are SPA's. Angular JS is defined on SPA framework.
What is Angular MVC?
What is data binding in AngularJS?
What is digest cycle in AngularJS?
What is AngularJS BootStrap process?
What is scope in AngularJS?
What are controllers in AngularJS?
What are services in AngularJS? When to use them?
How can you create services in AngularJS?
What are directives in AngularJS?
What are filters in AngularJS?
Explain templates in AngularJS?
How to implement routing in AngularJS?
What are the advantages of AngularJS?
What are disadvantages of AngularJS?
What is scope heirarchy in AngularJS?
How does validation works in AngularJS?
What is dependency injection in AngularJS?
Explain ng-repeat directive.
Explain $q service, deferred and promises?






Bookshelf

HTML
What is HTML5?
What is doctype?


CSS

jQuery
CouchDB

******************************************
Javascript
What is DOM?


AngularJS
What is a SPA?
What is Angular MVC?
What is data binding in AngularJS?
What is digest cycle in AngularJS?
What is AngularJS BootStrap process?
What is scope in AngularJS?
What are controllers in AngularJS?
What are services in AngularJS? When to use them?
How can you create services in AngularJS?
What are directives in AngularJS?
What are filters in AngularJS?
Explain templates in AngularJS?
How to implement routing in AngularJS?
What are the advantages of AngularJS?
What are disadvantages of AngularJS?
What is scope heirarchy in AngularJS?
How does validation works in AngularJS?
What is dependency injection in AngularJS?
Explain ng-repeat directive.
Explain $q service, deferred and promises?

NodeJS
What is NodeJS?
What are the benefits of NodeJS?
Is Node a single threaded application?
What is npm?
What is event loop?
What is piping in Node?
Can you use install multiple versions of NodeJS?
What is an error-first callback?
What is callback hell and how can you avoid it?
What are Promises?
What's your favorite HTTP framework and why?

Express
What is Express Js?
Why use Express?
What are core features of Express framework?
What is the parameter “next” used for in Express?


Bookshelf

HTML
What is HTML5?
What is doctype?


CSS

jQuery
CouchDB


https://www.codementor.io/angularjs/tutorial/angularjs-interview-questions-sample-answers

List at least three ways to communicate between modules of your application using core AngularJS functionality.
Which means of communication between modules of your application are easily testable?
The most popular e2e testing tool for AngularJS is Protractor. There are also others which rely on similar mechanisms. Describe how e2e testing of AngularJS applications work.
When a scope is terminated, two similar “destroy” events are fired. What are they used for, and why are there two?
How do you reset a “$timeout”, and disable a “$watch()”?
Name and describe the phases of a directive definition function execution, or describe how directives are instantiated.
How does interpolation, e.g. “{{ someModel }}”, actually work?
How does the digest phase work?
List a few ways to improve performance in an AngularJS app.
What is $rootScope and how does it relate to $scope?
What is AngularJS?
What is data binding in AngularJS?
What is scope in AngularJS?
What are the controllers in AngularJS?
What are the services in AngularJS?
What are the filters in AngularJS?
Explain directives in AngularJS.
Explain templates in AngularJS.
What is routing in AngularJS?
What is deep linking in AngularJS?
What are the advantages of AngularJS?
What are the disadvantages of AngularJS?
Which are the core directives of AngularJS?
Explain AngularJS boot process.
What is MVC?
Explain ng-app directive.
Explain ng-model directive.
Explain ng-bind directive.
Explain ng-controller directive.
How AngularJS integrates with HTML?
Explain ng-init directive.
Explain ng-repeat directive.
What are AngularJS expressions?
Explain uppercase filter.
Explain lowercase filter.
Explain currency filter.
Explain filter filter.
Explain orderby filter.
Explain ng-disabled directive.
Explain ng-show directive.
Explain ng-hide directive.
Explain ng-click directive.
How angular.module works?
How to validate data in AngularJS?
Explain ng-include directive.
How to make an ajax call using Angular JS?
What is use of $routeProvider in AngularJS?
What is $rootScope?
What is scope hierarchy in AngularJS?
What is a service?
What is service method?
What is factory method?
What are the differences between service and factory methods?
Which components can be injected as a dependency in AngularJS?
What is provider?
What is constant?
Is AngularJS extensible?
On which types of component can we create a custom directive?
What is internationalization?
How to implement internationalization in AngularJS?


What is notion of directives in AngularJS?
Name some of the most commonly used directives? What is uage of ng-app, ng-controller, ng-view, ng-model etc?
Explain how MVC is achieved with AngularJS? What are the benefits of client-side MVC, in general?
What is $scope object? Who injects it? Why is it used?
What is $scope.$apply and $scope.$digest method?
What is two-way data binding? Give an example?
Give an example of dependency injection with respect to AngularJS?
What is concept of routing? Show with an example? What Angular module is required to execute routing functionality?
How could one create single-page application using AngularJS? Which provider is used to achieve this objective?
What setup may be needed to do unit testing with AngularJS? What features of Angular come handy for doing unit tests?


  1. Can the angular application be initialized on only HTML element or ANY element?
    Ans: ANY element
  2. Can an HTML page have multiple “ng-app” directive for bootstrapping multiple AngularJS application?
    Ans: Yes
  3. With more than one ng-app in an HTML document (an HTML page), are they automatically initialized? Describe the angularJS application initialization process with multiple ng-app in an HTML document/page.
    Ans: Only one AngularJS application can be auto-bootstrapped. The first ‘ng-app’ found in the document will be used to define the root element to auto-bootstrap as an application. To run multiple applications in an HTML document, one must manually bootstrap them using angular bootstrap service.
  4. Describe the steps involved in bootstrapping an angular application?
    Ans: Following steps are involved in bootstrapping the angular application:
    • Determine the element consisting of ng prefixes with “app”
    • Check whethar an angular app already exists on the element
    • Compile & link with the help of dependencies such as rootScope injected (used for linking).
  5. Can angular applications (ng-app) be nested within each other?
    Ans: No
  6. What are various possible prefixes such as “ng-” using which Angular directives (for example, ng-app) can be defined?
    Ans: “ng-“, “data-ng-“, “ng:”, “x-ng-“
  7. What are various possible ways in which angular application can be initialized?
    Ans: On an element, one could either put simply the attribute such as (ng-app, data-ng-app, ng:app, x-ng-app) or put the named attribute such as (ng-app=”demoApp”).
  8. What angular function is used to manually start up an angular application?
    Ans: angular.bootstrap
  9. Can multiple angular applications be bootstrapped using same element?
    Ans: No. An error is thrown such as “App Already Bootstrapped with this Element”
  10. At framework level, how does Angular retrieve the matching elements for processing?
    Ans: Makes use of jqLite(element) function. If jQuery is used, jQuery(element) is used by way of assigning jQuery to jqLite variable.>

No comments:

Post a Comment