0% found this document useful (0 votes)
167 views

AngularJS 1.x Routers and Custom Directives

The $anchorScroll service enables automatic scrolling of the page when the URL contains a hash fragment. The $compile service traverses the DOM looking for directives and compiles templates. States are defined using the $stateProvider service, and the ui-sref directive allows creating links between states.

Uploaded by

arun challa
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
167 views

AngularJS 1.x Routers and Custom Directives

The $anchorScroll service enables automatic scrolling of the page when the URL contains a hash fragment. The $compile service traverses the DOM looking for directives and compiles templates. States are defined using the $stateProvider service, and the ui-sref directive allows creating links between states.

Uploaded by

arun challa
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 3

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 href.
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 the route U

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 the attribute nam
should be matched?

which of the following variables can be injected into a function once you have included ui-router in the list of dependencie
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
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

TCS INTERNAL USE


Correct Incorrect
Enables Automatic
$location
ng outlet ngLink
Otherwise()
ngRoute
Loads Template in -ng view element
enables changing remains fixed
No
href="#/detail/{{food.id}}" href="#/detail/{food.id}"

getDate

State url to be activated


does not allow
Ui-sref

uirouter, ngroute

ngrepeat
Yes No. With certain only
During run time Never
0 1

Compile Both

Directive $compile
URL property for large
very small templates markups
standard behaviour to new
creates new HTML elements

$urlRouterProvider and $stateProvider


digest
RouteConfig
less messy
param
$state
Abstract state cannot have url
angular-animate.js
Parent Scope
controller expose API
1
$anchorScroll

TCS INTERNAL USE


Incorrect

RouteConfig

utilizes to setup paths Prevents currnt URL

href='#/ http

new Date

During Compile Time

link

Angular JS only support


very large templates external

inject

TCS INTERNAL USE

You might also like