Skip to content

Commit f80b982

Browse files
authored
Update api.md
1 parent ceb1112 commit f80b982

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ source:[https://github.com/angular/angular/commit/344a5ca#diff-0ef0b3df44ffd7a42
2929
You are not sure what the context you are doing the rendering. You might be assuming the browser compilation and native DOM methods to be available but that might not be the case. It is better to be safe and let Angular handle the manupulation for elements.
3030

3131
* How would you protect a component being activated through the router?
32-
[Please correct me if I am wrong ] By Defning gaurds in angular like CanActivate,CanActivateChild, CanDeactivate, CanLoad source : [https://blog.thoughtram.io/angular/2016/07/18/guards-in-angular-2.html]
33-
Guards can be implemented in different ways, but after all it really boils down to a function that returns either Observable<boolean>, Promise<boolean> or boolean. In addition, guards are registered using providers, so they can be injected by Angular when needed.
32+
By Defning gaurds in angular like CanActivate,CanActivateChild, CanDeactivate, CanLoad (source)[https://blog.thoughtram.io/angular/2016/07/18/guards-in-angular-2.html]
33+
Guards can be implemented in different ways, but after all it really boils down to a function that returns either Observable<boolean>, Promise<boolean> or boolean. In addition, guards are registered using providers, so they can be injected by Angular when needed. Check out John Papa's [guard implementation](https://github.com/johnpapa/angular-first-look-examples/blob/master/_examples/storyline-tracker/app/core/auth-guard.service.ts)
3434

3535
* How would you insert an embedded view from a prepared `TemplateRef`?
3636

@@ -52,4 +52,4 @@ You are not sure what the context you are doing the rendering. You might be assu
5252
- Any class with the *@Component* or *@Directive* decorator.
5353
- Template reference variable as a string (e.g. query <my-component #cmp></my-component> with @ViewChild('cmp'))
5454
- Any *provider* defined in the child component tree of the current component (e.g. @ViewChild(SomeService) someService: SomeService)
55-
- A *TemplateRef* (e.g. query <ng-template></ng-template> with @ViewChild(TemplateRef) template;)
55+
- A *TemplateRef* (e.g. query <ng-template></ng-template> with @ViewChild(TemplateRef) template;)

0 commit comments

Comments
 (0)