this is very visual and helpful in capturing the architecture. I've been using Angular 2+ since its beta and this solidifies any "tricks" and knowledge that I've come across over the years. Thank you so much
Wow. I don't have words to describe how I feel after watching this conference. I thought I'd watch for about 3-7min straight the topic that I need. But I ended up watching the video from 0:00 till the end. Thank you :)
That was so good I scraped my project and started from 0. Excellent thanks, and I say it without sarcasm, my app was entering labyrinth mode and with this, the resolving beforehand, it now is clean as a whistle.
Around 12:50 the note about the component being injected into the guard is so important (as she said). I recently cleaned up a guard where, despite component being right there in the signature, someone went to the trouble of adding: a touched flag in the global state, and an associated action to dispatch (ngxs) when it should be flipped. Just for this one form. The component is right there.
N > 2.5 for me (I knew about nested routing but never really understood it until I watched this video)- also the enable Tracing and the loading spinner was super cool
there is simply stuff. ask me how I make deal with routing of 9 angular microservices without losing a SPA between navigates and to show 3 microservices on 1 page and each one have own routing? it was hell we need feature for building lazy modules as separated bundles
N = 1, the 'canDeactivate' guard was new for me! I have tried it out and have found that the more interesting question is: How do you set the 'isDirty' property in 'MovieEditComponent'? More precisely, how do you detect if your form has unsaved changes?
Thanks, but my question was how to detect if the form (as a whole) has unsaved changes, not how to check individual form-controls for changes.
6 лет назад
I have implemented my own detection mechanism, which makes a record into a map, everytime something changes. By changing the state of the form a method is called (via event) to record the change, if there is a given key, the fields name or whatever you want it to be identified by, than the record is deleted, if there is none, a new record is made. Than you can check if the map contains any record or you can create a boolean property unsavedChanges: bool for example, if you wold like to make it clearer. This works if the field has only two states, if you want to keep track of changes between more states, you will have to use different data structure in order to be able to go back without interuption, if the user manually reverted his change. There might be some library for thi tho, I have not searched.
Following the link above you'll see that the FormGroup (the entire form) also has a dirty flag as does each individual element. You can download the code for this session following the link in the slides to see the details of how its done.
i liked the way the spinner was handled from just inside the app component, but what about when i'm fetching data from the server without any re-routing ? I just have a table and the user did some filters so now I have to fetch the new results and show a spinner meanwhile. Or maybe not a table just any filter example where I need to reload data but in the same page. (I know how to do it but asking if there's a better way just like the method used in this video)
2:10 menus and outlets 5:03 Children, 5:54 Resolver makes routing wait for completion of async operation. route.snapshot.data, 9:13 router.evenst.subscribe to show spinner. 10:51 enableTracing:true. 12:01 Guard services: CanActivate, CanDeactivate, CanLoad 14:25 Createe const appRoutes: Routes to hold the definition 15:46 RouterModule.forChild wouldn't work 18:27 Lazy loading: loadChildren: "urlRoot.module#MyModule"
Given your role as a spokesperson, I strongly recommend investing time in mastering proper breathing techniques. Currently, your delivery often sounds as if you're running out of breath midway through your statements. This issue not only detracts from the topic at hand but also diminishes the overall impact of your communication. Addressing this aspect is critical for maintaining audience engagement and ensuring effective delivery.
What is the proper way of using both resolvers and guards with ngrx especially on resolving data that you want to keep track of changes in the navigated component
Hey Deborah am stuck I have a navigation menu in a parent component but when I press on a link to a child component.. The navigation menu appears in the top of the child. How will I hide the navigation from the child or make it not appear in the child component. Do you have any video tutorial for that in angular 4. Please help. Its urgent.