Most asking Top 10 AngularJS Interview Questions and Answers. Please read below questions and answers.
Q#1. What is AngularJS?
A#1. AngularJS is a framework to build large scale and high performance application.
- AngularJS is a very powerful JavaScript Framework.
- It is provides developer to write a client side application in MVC method.
- Open source and free. And used by many developers and tested.
Q#2. What are the controllers in AngularJS?
A#2. Controllers are JavaScript functions. They decide which view is to be updated to show the updated model based data.
Q#3. What are filters in AngularJS?
A#3. Filters select a subset of items from an array and return a new array. Filters are used to show filtered items from a list of items based on defined criteria.
Q#4. What is routing in AngularJS?
A#4. ngRoute module you can use to navigate the pages in AngularJs.
Example from w3school
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
<body ng-app="myApp"> <p><a href="#/!">Main</a></p> <a href="#!red">Red</a> <a href="#!green">Green</a> <a href="#!blue">Blue</a> <div ng-view></div> <script> var app = angular.module("myApp", ["ngRoute"]); app.config(function($routeProvider) { &nbs |