mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
feat(challenge6): readme
This commit is contained in:
@@ -1,21 +1,42 @@
|
|||||||
<!-- TODO: add title of your exercice -->
|
|
||||||
<h1>Permissions</h1>
|
<h1>Permissions</h1>
|
||||||
|
|
||||||
<!-- TODO: Add your name -->
|
|
||||||
|
|
||||||
> Author: Thomas Laforge
|
> Author: Thomas Laforge
|
||||||
|
|
||||||
<!-- TODO: add Information/Statement/Rules/Constraint/Steps -->
|
|
||||||
|
|
||||||
### Information
|
### Information
|
||||||
|
|
||||||
|
Structural directive is an important concept you will need to master to improve your angular skills and knowledge. This will be the first part of this challenge.
|
||||||
|
|
||||||
|
Guard is also very important since you will always need it in every application you build.
|
||||||
|
|
||||||
### Statement
|
### Statement
|
||||||
|
|
||||||
|
In LoginComponent, you will find 6 buttons corresponding at 6 differents users.
|
||||||
|
|
||||||
|
- Admin
|
||||||
|
- Manager
|
||||||
|
- Reader
|
||||||
|
- Writer
|
||||||
|
- Reader and Writer
|
||||||
|
- Client
|
||||||
|
|
||||||
### Step 1
|
### Step 1
|
||||||
|
|
||||||
|
In **InformationComponent**, display the correct piece of information for each roles.
|
||||||
|
|
||||||
|
#### Constraints:
|
||||||
|
|
||||||
|
- no ngIf directive inside **InformationComponent**
|
||||||
|
- importing the store inside **InformationComponent** is not allowed.
|
||||||
|
|
||||||
|
You should end up with something like below:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<div *hasRole="Manager">Info for Manager</div>
|
||||||
|
```
|
||||||
|
|
||||||
### Step 2
|
### Step 2
|
||||||
|
|
||||||
### Constraints:
|
In **Routes.ts**, route all user to the correct DashboardComponent using CanMatch guard.
|
||||||
|
|
||||||
### Submitting your work
|
### Submitting your work
|
||||||
|
|
||||||
@@ -27,13 +48,10 @@
|
|||||||
6. Commit your work
|
6. Commit your work
|
||||||
7. Submit a PR with a title beginning with **Answer:6** that I will review and other dev can review.
|
7. Submit a PR with a title beginning with **Answer:6** that I will review and other dev can review.
|
||||||
|
|
||||||
<!-- TODO: add challenge number and project Name -->
|
|
||||||
|
|
||||||
<a href="https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A6+label%3Aanswer"><img src="https://img.shields.io/badge/-Solutions-green" alt="permissions"/></a>
|
<a href="https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A6+label%3Aanswer"><img src="https://img.shields.io/badge/-Solutions-green" alt="permissions"/></a>
|
||||||
|
|
||||||
<!-- TODO: uncomment when done late -->
|
<!-- TODO: uncomment when done late -->
|
||||||
<!-- <a href='https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A{challenge number}+label%3A"answer+author"'><img src="https://img.shields.io/badge/-Author solution-important" alt="{Project name} solution author"/></a>
|
<!-- <a href='https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A{challenge number}+label%3A"answer+author"'><img src="https://img.shields.io/badge/-Author solution-important" alt="{Project name} solution author"/></a>
|
||||||
<a href="{Blog post url}" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/-Blog post explanation-blue" alt="{Project name} blog article"/></a> -->
|
<a href="{Blog post url}" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/-Blog post explanation-blue" alt="{Project name} blog article"/></a> -->
|
||||||
|
|
||||||
<!-- TODO: you can add your twitter or anything else if you wish -->
|
_You can ask any question on_ <a href="https://twitter.com/laforge_toma" target="_blank" rel="noopener noreferrer"><img src="./../../logo/twitter.svg" height=20px alt="twitter"/></a>
|
||||||
<!-- _You can ask any question on_ <a href="https://twitter.com/laforge_toma" target="_blank" rel="noopener noreferrer"><img src="./../../logo/twitter.svg" height=20px alt="twitter"/></a> -->
|
|
||||||
|
|||||||
Reference in New Issue
Block a user