0% found this document useful (0 votes)
303 views8 pages

AngularJS 1.x Routers and Custom Directives

The document discusses various features of AngularJS routing and UI-Router. It includes 41 multiple choice questions about concepts like route configuration, route parameters, state definition, animations, directives, and services related to routing like $location, $stateParams, $animate etc. The questions cover topics like setting up routes, linking routes to templates, accessing route parameters, defining and accessing states, enabling animations, using directives and services for routing functionality.

Uploaded by

Santhosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
303 views8 pages

AngularJS 1.x Routers and Custom Directives

The document discusses various features of AngularJS routing and UI-Router. It includes 41 multiple choice questions about concepts like route configuration, route parameters, state definition, animations, directives, and services related to routing like $location, $stateParams, $animate etc. The questions cover topics like setting up routes, linking routes to templates, accessing route parameters, defining and accessing states, enabling animations, using directives and services for routing functionality.

Uploaded by

Santhosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 8

S.

No
1

2
3
4
5
6

10
11

12
13

14
15

16

17
18
19

20

21

22

23

24
25
26

27

28

TCS INTERNAL USE


29
30
31
32

33
34
35

36
37

38
39
40

41
42

TCS INTERNAL USE


Question
what is a feature of the $anchorScroll service?

The............... service is not able to function properly if the current URL is outside the URL given as the base h
The directive..................that marks where the router should display a view.
Which function is used to set up a default route?
With _____, views and routes are tied to the application url
Which function best describes routing?

what is the purpose of the $location service?

Is router part of core Angular script file?

Which is the correct syntax format for constructing a route and binding a route parameter?
Complete the code to set up the locale controller to use the local service function
LocaleController(scope,scope,locale) { scope.myDate=Date.Now();
scope.myDate=Date.Now();scope.formattedDate=?.DATETIME_FORMATS.fullDate; }
For using ui-sref, what is required

What is not a characteristics of a UI-Router?


Which UI-Router directive allows you to create links connecting to your states?
____ implements routing based on the state of the application where as ______ implements routing based on t
route URL
Which of the directives allow the animation move?

Can animations be achieved with custom directive?

When does ngAnimate checks for animation in the application?


Every built-in directive in AngularJS support animations.
In AngularJS, .............. is an Angular service which traverses the DOM looking for attributes.
A .......... is a behavior which should be triggered when specific HTML constructs are encountered during the
compilation process

Which feature best describes the template property?

which feature best describes the $compile service?


When creating an AngularJS directive, which character is used with the restrict option to specify that only t
attribute name should be matched?
which of the following variables can be injected into a function once you have included ui-router in the list o
dependencies for your module?
Which function can be used to update the HTML?
................Configures a Router with RouteDefinitions, each mapping a URL path to a component.

Which is not true about directives?

In UI router, _________ can be used to provide your controller with content or data that is custom to the state

TCS INTERNAL USE


States are defined using ________ service
What is not true about an abstract state?
ngAnimate module is defined in which library?
What is default scope in a angular directive

What is the difference between controller and link in directives


$animate can be used in a directive
Select the AngularJS services required to perform automatic scrolling in an HTML page
A ___________ is a javaScript factory function that holds a set of instructions for the HTML compiler for definin
specified behavior of a DOM element.
Transclude option is used to

Angularjs Application may have


Staggering animations work with
ngAnimate can be used with
When ngAnimate is animating an element it will apply the __________ CSS class to the element for the duratio
the animation
$stateParams is used to access url parameters of parent state

TCS INTERNAL USE


Correct
Enables automatic scrolling in parts of a page

$location
ng outlet
Otherwise()
ngRoute
Loads templates into the ng-view element
It enables changing the path of the application in
order to perform navigation
No. It is not. One need to download and include the
router script file exclusively

href="#/detail/{{food.id}}"

The state to be the activated


It does not allow the use of multiple subviews on a
page
Ui-sref

ui-router, ngRoute
ngrepeat
Yes. Animations are possible with custom directives
using $animate service

During run time


0
Compile

Directive
The template property is used for very small
templates

Creates new HTML elements and attributes

$urlRouterProvider and $stateProvider


digest
RouteConfig
Code can be modularized based on the behavioral
functions

resolve

TCS INTERNAL USE


Abstract state cannot have a url
angular-animate.js
Parent Scope
controller can expose an API to other directives but
link cannot
1

Directive
Create a directive that wraps other elements
exactly one root scope but may have several child
scopes
ng-repeat
Both CSS and Javascript

ng-animate
0

TCS INTERNAL USE


Incorrect

ngLink RouteConfig

Prevents currnt
remains fixed utilizes to setup paths URL

href="#/detail/
{food.id}" href='#/ http

getDate new Date


url to be activated

No. With certain only

Never During Compile Time


1
Both link

$compile
URL property for large Angular JS only
markups very large templates support external
standard behaviour to
new elements

less messy

param inject

TCS INTERNAL USE


$state

$anchorScroll

TCS INTERNAL USE

You might also like