Looking for test answers and solutions? Browse our comprehensive collection of verified answers for at moodle-miage-toulouse.westeurope.cloudapp.azure.com.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Le code suivant permet de définir des routes internes à une SPA Angular :
const appRoutes: Routes = [ {path: 'date', component: DateComponent}, {path: 'hello/?nom', component: HelloComponent}, {path: '', redirectTo: 'date', pathMatch: 'full'}, {path: '**', redirectTo: 'date'}];Le code suivant est correct pour Angular :
import { Component, Input } from '@angular/core';@Component({selector: 'hello',template: `<h1>Hello {{name}}!</h1>`, styles: [`h1 { font-family: Lato; }`]})export class HelloComponent {}Cochez tout ce qui est vrai pour Angular
Le code suivant permet de définir des routes internes à une SPA Angular :
const appRoutes: Routes = [ {path: 'hello/:nom', component: HelloComponent}, {path: '', redirectTo: 'date', pathMatch: 'full'}, {path: '**', redirectTo: 'date'}];Le code suivant est correct pour Angular :
import { NgModule } from '@angular/core';import { CommonModule } from '@angular/common';import { HelloComponent } from './hello.component';import { DateComponent } from './date/date.component';import { HelloService } from './hello.service';export { HelloService } from './hello.service';@NgModule({ imports: [CommonModule], declarations: [HelloComponent, DateComponent], exports: [HelloComponent, DateComponent], providers: [HelloService]})export class PartageModule { }Le code suivant permet de définir des routes internes à une SPA Angular :
const appRoutes: Routes = [ {path: 'date', component: DateComponent}, {path: 'hello/:nom', component: HelloComponent}, {path: '', redirectTo: 'date', pathMatch: 'full'}, {path: '**', redirectTo: 'date'}];Le code suivant est correct pour Angular :
import { Component, Input } from '@angular/core';@Component({selector: 'hello',template: `<h1>Hello {{name}}!</h1>`, styles: [`h1 { font-family: Lato; }`]})export class HelloComponent { @Input() name: string;}Le code suivant est correct pour Angular :
import { Component, OnInit } from '@angular/core';import { HelloService } from '../hello.service';@Component({ selector: 'date-pipe', template: `<div> <p>On est le {{today & date}}</p> <p>Ou, si vous préférez, le {{today & date:'fullDate'}}</p> <p>Il est {{today & date:'H:mm'}}</p> </div>`})// Get the current date and time as a date-time value.export class DateComponent { today: number = Date.now();}Le code suivant est correct pour Angular :
import { Component, Input } from '@angular/core';@Component({selector: 'hello', styles: [`h1 { font-family: Lato; }`]})export class HelloComponent { @Input() name: string;}Le code suivant génère une erreur en TS :
interface Point2D {
x: number;
y: number;
}
function iTakePoint2D(point: Point2D) {
/* do something */
console.log(point.x,point.y);
}
iTakePoint2D({ x: 0 });
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!