Back to Blog
Appbox class angular 27/24/2023 ![]() Structural directive: This is the next level, these directives effect the structure of the HTML element e.g.something you can use to change the colour of an element A simple example would be the ng-class directive i.e. they change the appearance or behaviour of the element but not the structure. Attribute directives: They are only used as attributes of HTML elements i.e.As such there are now 3 types of directives in Angular From Angular 2 onwards, Google added a bit of depth to it, by further separation of concerns. Angular 1.x onwards and they were a little simpler in earlier versions. I have been working with directives since AngularJS i.e. For starters, you can have a read of the official docs here. That should tell you everything you need to know about uploading files to FireStorage with AngularFire. There are already some really good tutorials out there for this so you can just refer to those. I won’t be talking about how to upload a file to Firebase storage with AngularFireStorage. I have been using the AngularFire library and it does make things more convenient when working with Angular/Firebase. I want to upload an image to a specific path in Firebase cloud storage and I also want to know when the asynchronous uploading process is complete. In this post, I will talk about how to achieve this as well as share the code via my Github repo mdt_ionic_tutorials. A directive is code that can be reused and easily integrated across other apps. Given my experience with Angular I thought, this would be something a directive would solve. I mean, a reusable angular component to upload images. I thought, the aspect of uploading an image, is clearly independent from the rest of the app, so why not isolate it from the rest of the code? So I can reuse it in other apps. ![]() I am currently working on a project with Angular/ Ionic framework and one of the problems I had to solve was to upload an image to Firebase Cloud storage. I am always looking for ways to improve efficiency and reduce the amount of code I have to write. ![]()
0 Comments
Read More
Leave a Reply. |