Posts by Leo Brescia • 631 points
27 posts
- 
		0 votes1 answer72 viewsA: Does not load video tag [ HTML ]The source is not locating backgroundIIII.mp4 Put the video in the folder public. Ai modifies the source: <source src={process.env.PUBLIC_URL + '/backgroundIII.mp4'} type="video/mp4" />… 
- 
		1 votes1 answer45 viewsA: How to know the parent element size and change child element attributes? [Styled Components]You’ll have to use the useRef to "pick up" the element and the useEffect to catch width every time it changes. Then just check and change the style. Something like that: const ref = useRef(null);… 
- 
		0 votes1 answer44 viewsA: Error in socket.io "expression cannot be called" in React/NextOn line 19: According to the documentation of socket.io-client you must import the io as follows: import { io } from "socket.io-client"; In yours was missing the {} Lines 20 and 21 errors are saying… 
- 
		1 votes1 answer144 viewsA: Inserting data into failed Datagrid for unique ID not found React Material-UIAccording to the error shown, one or more lines are missing the attribute id. The structure must be something like this: { id: 1, lastname: 'Snow', firstName: 'Jon', age: 35 }. I suppose the… 
- 
		0 votes1 answer128 viewsA: Resume the number address suggestions with google Places ApiWhat Uber does is use the Place Details. You need to pass the placeid that you get by making a site search In the result of this endpoint comes the street number.… 
- 
		0 votes1 answer401 viewsA: Fill form fields with API dataYou will create the inputs of the fields you want, each with its own ng-model. For example: <input type="text" ng-model="marca" class="form-group" /> Within the then you enter the value into… 
- 
		2 votes1 answer758 viewsA: Load Reactjs pageIt’s because you’re using the owl-carousel in an React project. Owl-Carousel uses jQuery. In theory you don’t need jQuery along with React. This can cause problems such as what you are facing. That… 
- 
		6 votes2 answers7589 viewsA: How to pass parameters via url to an application in React?Whereas you’re using the React Router: In the route configuration, put the name of the parameter at the end of the path along with two points(:). Ex.: path="/:id" <Route exact path="/:id"… 
- 
		1 votes1 answer33 viewsA: Error adding ternary condition within a ui-srefTo do it inside ui-sref you need two sets of keys {{}}: <a class="article-home-small" ui-sref="{{obj.content_type == 'article' ? article({uid: obj.uid, title: slug(obj.title)}) :… 
- 
		0 votes1 answer225 viewsA: Reactjs - Catch exported constantTo import something you need to export first: export const token = 'Z31XC52XC4'; Before showing how to import, it is worth explaining two types of import. The first is the default( which is the one… reactanswered Leo Brescia 631
- 
		0 votes1 answer113 viewsA: How do I open a modal with youtube video with different video`s?Try to think about putting that kind of information inside the state. State is the state of its component. If there is something that changes this way, it would be interesting to put inside the… 
- 
		11 votes1 answer14667 viewsA: REACT-JS - Warning: Each Child in a list should have a Unique "key" propIt is a common problem. All items in a rendered list must contain a property called key and it should be unique( ie, can not have another key equal). I saw that in your code you put <li… 
- 
		1 votes1 answer65 viewsA: Problem when startar React projectYou’re reaching the observer threshold of your system. Try to run this: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p Visit here to learn more:… 
- 
		1 votes1 answer599 viewsA: Routes in ReactjsOK... There’s some weird stuff in the code. The Routes.jsis not being used. At least not in those files you showed. Inside this file you are using the App component in this excerpt <Route… 
- 
		0 votes1 answer4961 viewsA: How to upload Angular js filesAlong those lines: var uploader = $scope.uploader = new FileUploader({ url: 'upload.php' }); You set the url to which you want to send the item(s) to). After the form receives the items you need to… 
- 
		0 votes1 answer34 viewsA: Update tbody when selecting option in ng-optionsYou can use ng-if to change tables: <tbody ng-if="prop.value === 'CDI'"> ... </tbody> <tbody ng-if="prop.value === 'IBOVESPA'"> ... </tbody> OR creates an array/object with… 
- 
		0 votes1 answer56 viewsA: Project in AngularjsThis error is occurring because the module postitService is not being found by your application. In the codes you sent there is no statement of this module. Apparently you don’t need this module. It… angularjsanswered Leo Brescia 631
- 
		1 votes1 answer53 viewsA: Angularjs and Image Picker - I can’t capture selector contentIs there any need to use the select? You get the result you want using the input:radio Would something like this: <p>Escolha o jogo</p> <div class="image-picker show-html">… 
- 
		0 votes1 answer34 viewsA: Filter in search without displaying table when loading pageI can think of two ways. The first and easiest is to add a search button. The user fills the search field click on the button that executes a function that does the search, filters and fills the… angularjsanswered Leo Brescia 631
- 
		1 votes1 answer42 viewsA: Angularjs Prevent the entry of data-free urlsyou need to check If the id exists If the ID is valid To then redirect if either case is false. Taking into account that you are using the Ui-router: It would be something like that: init();… angularjsanswered Leo Brescia 631
- 
		0 votes1 answer514 viewsA: Use iframe Angularjs variablethe url needs to be trusted. There are some ways to do this. First is to use the function trustAsResourceUrl: $scope.episodio.player = $sce.trustAsResourceUrl($scope.episodio.player) Another thing… 
- 
		2 votes1 answer238 viewsA: Angularjs - Problem with Angular-ChartsYour variable $Scope.data could be the problem. Is like: $scope.data = [ [300, 500, 100] ]; Should be: $scope.data = [300, 500, 100]; Just reinforcing, make sure the files are in the code:… 
- 
		0 votes1 answer57 viewsA: How to remove value after floating pointWhen seeing me you need to add a few more ifs. The problem may be in if (restoUnidade == 1 && dezena <= 1) I don’t quite understand what you want, but see if that helps you. Modify this… 
- 
		1 votes1 answer454 viewsA: I can’t test my Ionic app: Cors errorThe problem is the new version of Cordova-plugin-Ionic-webview 2.0 that breaks compatibility with Android 4.4. The solution is to switch to version 1.2.1: cordova plugin rm… 
- 
		1 votes1 answer500 viewsA: Clear input - ng-model - changeAngularjs has a directive to detect changes: ng-change My suggestion is that you create a function to clear what you want to clean and use ng-change in select. Ex.: <md-select… 
- 
		0 votes1 answer31 viewsA: Recording Null Angularjs DatabaseAll the action of sending the data is in Angularjs, you did it using the Submit() function. Thus, the < form > does not need a action. Try removing the action="app/models/queroContract.php" of… 
- 
		0 votes1 answer79 viewsA: Problems with Iframe and jsYour problem is that the function is called all the time. Then the video is rendered every second, so it 'flashes'. What you can do is use the function setInterval() passing the setDate() function…