Angular 2 Routers and Custom Directives
Angular 2 Routers and Custom Directives
Which is the correct syntax format for constructing a route and binding a route
parameter?
<a ng-href=�#/detail/{{food.id}}�>Click for more.......</a>
The����� service is not able to function properly if the current URL is outside the
URL given as the base href.
$location
Complete the code to set up the locale controller to use the local service function
LocaleController($scope,$locale) { $scope.myDate=Date.Now();
$scope.formattedDate=?.DATETIME_FORMATS.fullDate; }
$locale
____ implements routing based on the state of the application where as ______
implements routing based on the route URL
ui-router, ngRoute
which of the following variables can be injected into a function once you have
included ui-router in the list of dependencies for your module?
$urlRouterProvider AND $stateProvider
----------------------------------------------------------------------
When creating an AngularJS directive, which character is used with the restrict
option to specify that only the attribute name should be matched?
A
A ___ is a javaScript factory function that holds a set of instructions for the
HTML compiler for defining a specified behavior of a DOM element.
Directive
A ���. is a behavior which should be triggered when specific HTML constructs are
encountered during the compilation process
Directive
In AngularJS, ����.. is an Angular service which traverses the DOM looking for
attributes.
Compile
------------------------------------------
States are defined using service
$stateProvider
��������must be called on a scope when it is desired for the scope and its child
scopes to be permanently detached from the parent
$destroy()
Inside your MainCtrl class, you want to make a request to the server. Complete the
code segment you would use to do this by providing the appropriate service.
������ .get($scope.url).success(function(result,status.headers.config)
{ console.log('GET SUCCESS'); console.log(result);
$scope.result1=result['data']; });
$post (wrong)