Posts by rafaelmacedo • 151 points
15 posts
-
0
votes2
answers65
viewsA: Function that runs for and goes excluding according to condition
How you are doing a FOR, changing a global attribute, when you search for an item by index and use the splice to remove it, the next item of what you just deleted ends up getting in place of the…
-
0
votes2
answers144
viewsA: Repeat structure that compares equal values and prints the match
As you are using Typescript, it would be nice for you to use its features, such as Arrow Functions, follows an example of what the same solution above would look like.…
-
1
votes2
answers2064
viewsA: How to perform a function on one component and affect another component - Angular 6
You can use @Service with a Behaviorsubject. Behaviorsubject contains the value that needs to be shared with other components, it at least is Observer and Observable it can receive and emit the…
-
0
votes0
answers27
viewsQ: How to implement the Marker Cluster plugin using Yagajs/leaflet
I want to implement the plugin Marker Cluster in my project using the yagajs/Leaflet. In the Marker Cluster documentation, they say I simply need to use the following code: var markers = new…
-
1
votes1
answer155
viewsA: How to do Jspdf dynamic positioning
You are on the right track, it is only a matter of calculation. Look at this example: var x = 15; var y = 20; for (var i = 0; i < item.length; i++) { doc.text(item[i].nome, x, y);…
-
1
votes2
answers8439
viewsA: How does the Grid System work in Angular Material Design?
The Angular Material Project feature list has no Grid System, be it by columns, flexbox or some other method. This component Grid List is nothing more than a resource to facilitate the…
-
0
votes3
answers139
viewsA: Angular2 Tynymce Text editor
It is possible to associate events to your website using (onSelectionChange)="handleEvent($eventObj)", for example. It is strongly recommended that you read the tinymce documentation…
-
0
votes3
answers1539
viewsA: Align these images and HTML and CSS text in the "correct" way
I made a small responsive solution. Just use the properties Position Absolute and Position Relative. As for the icons, just save them all in square proportion, regardless of the size will suit the…
-
0
votes1
answer443
viewsA: Jspdf not receiving content to generate pdf
Try it like this: doc.fromHTML($('#printavel').get(0), .... As shown in the documentation, it is necessary to use the method .get(0)
-
10
votes3
answers1622
viewsA: What are the allowed elements within the <P> tag?
The tag <p> defines a paragraph. Allowed within the tag <p> any plain text content and markups, such as: <abbr>, <audio>, <b>, <bdo>, <br>, <button>,…
-
0
votes1
answer30
viewsA: Disable checkbox when selecting next
Every time you give show() in a div, give Hide() in all other. $("#add-festa-p").change(function() { if ($(this).prop('checked')) { $("#add-festa-p-div").show(); $("#add-festa-k-div").hide();…
-
0
votes2
answers146
viewsA: How to catch the return of a service within a @Component with angular 6
What happens is that your Component is rendered before the service returns the content, just use ngIf in your table, forcing to render it only when you have content. <table *ngIf="values"…
-
-2
votes3
answers4910
viewsA: Consuming an API with Angular
Its structure is wrong in a general. First to map the returned Json objects it is necessary to create a class, not an interface. I don’t understand very well what you intend to do, but in the case…
-
1
votes3
answers425
viewsA: Consume api - Angular
Are you doing the *ngFor in the empty Movies array. Inside your '.subscribe' you must assign the value of 'date' to the local attribute 'films'. Thus: .subscribe(data => { this.filmes = data;…
-
0
votes1
answer218
viewsQ: Two Foreign key in the same EF column
I have a question, I am programming with . NET MVC using the Entity Framework. At the moment I have: class Produto { public int ProdutoId { get; set; } public string Nome { get; set; } public string…