-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Answer:55 #1037
base: main
Are you sure you want to change the base?
Answer:55 #1037
Conversation
@tomalaforge hello! This is my proposed solution...shall I create a link to this page for the UI? |
@Injectable({ | ||
providedIn: 'root', | ||
}) | ||
export class DialogService { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice service, a bit out of the challenge, but great generic service for people to add to their projects 👍
selector: 'app-simple-action', | ||
templateUrl: './simple-action.component.html', | ||
}) | ||
export class SimpleActionComponent { | ||
readonly #dialog = inject(MatDialog); | ||
export class SimpleActionComponent implements CanComponentDeactivate { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
component: CanComponentDeactivate, | ||
) => { | ||
return component.canDeactivate ? component.canDeactivate() : true; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I was surprised about the number of change, but you implemented a generic way of displaying dialog. Not really the challenge, but great way to show how to implement generic dialog inside an entreprise application. 🔥 |
What do you mean? |
xm yes it works out of the box...thanks |
well thanks first of all!...actually the idea and the purpose of this challenge is to combine both Angular features(like 'CanDeactivate' route guards) with Typescript and generic design patterns to provide a scalable solution. It can moved also to Typescript region/category, if you think it is better suited there. |
No description provided.