Questions tagged as 'jade'

1
answer

In Jade, how can I suppress the error if a variable does not exist?

I'm trying to create a form to create a user, but I use the same form to edit. When I try to create a new user the app shows me an error because in the form fields it tries to get information from a user that obviously does not exist because I a...
asked by 20.08.2015 / 16:53
1
answer

Pass HTML element into Jade variable

Below I have a call from an include for an "alert", I would like to know if it is possible inside the message variable not to pass pure HTML () but rather a # # call Well done! - Jade processor. - var type = 'success' - var message = '<stro...
asked by 19.10.2014 / 16:28
1
answer

How to format money with jade in node.js?

I have to display monetary values in my view, but it is appearing without formatting. For example, 5.4237 should be displayed as R$ 5,42 , but I do not know how to format this value using Jade with node.js . I need the value to...
asked by 05.11.2015 / 13:48
2
answers

read arrays in jade

I need to read an array on my jade page. In my controller I'm passing it as follows: res.render('graphics/index', {namesClient:JSON.stringify(namesClient)} In jade I'm reading as follows: var names= !{JSON.stringify(namesClient)};...
asked by 22.03.2016 / 14:57
1
answer

Defining default values to vary with the Pug Engine Template

I'm starting to work with MEAN and use the Pug template engine. I know the same was Jade previously and there have been updates on how to work with it. My problem is that in Jade, and in various places on the internet, I have the informatio...
asked by 20.01.2017 / 02:42
1
answer

Join controllers

I have this controller that sends a normal Error or Success notification $scope.add = function () { if(!$scope.name || !$scope.url ){ $scope.success = null; return $scope.error = 'Preencha todos os campos.'...
asked by 05.10.2016 / 21:47
1
answer

Denomination / Naming of Jade template engine

Hello, a few days ago I'm getting a message when I install the Jade Template Engine via npm , the message says: npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade My...
asked by 06.05.2016 / 23:41
1
answer

Json line break

I'm trying to develop a system with Node.js and I'm trying to list the database's data in my table, but the data gets all together like this: IstilldonotunderstandmuchaboutJson,isitbecausehe'sthatway? This is my role listing: Usuario.find(...
asked by 03.07.2015 / 18:36
0
answers

Communication failure while joining agent platform: No ICP active - JADE

Hello, could you help me with this, I'm starting JADE now, and I'm trying to start two agents, however it gives the following exception: Communication failure while joining agent platform: No ICP active jade.core.IMTPException: No ICP active...
asked by 17.09.2016 / 22:17
1
answer

Change the contents of a DIV from another site

Good afternoon, I'm having a hard time finding a way to make two divs communicate and I need help finding out what I can use to make this communication For example, an object will send a command from site2 and will change a url inside a di...
asked by 24.05.2016 / 22:43