user7345787
user7345787

Reputation:

Why should we convert url into safe url in Angular 2?

why should we need to convert the url into safe in angular 2 ?

can't we use how we are using in other languages?

<div href="'url' | safeUrl"></div>

Anyone ?

Upvotes: 3

Views: 560

Answers (1)

Alex Beugnet
Alex Beugnet

Reputation: 4071

Check out the security documentation on this link :

https://angular.io/docs/ts/latest/guide/security.html

Before anything it shows the basics of the good ways to use Angular2 and then explains pretty well the different web problematics every web developper should be aware of. (And it's not long, how lucky are you !)

Also, if you don't know about it, this link explains why and how to use matrix URLs with Angular2 (for the router part) : https://angular.io/docs/ts/latest/guide/router.html#!#optional-route-parameters

Upvotes: 3

Related Questions