Category: mean-stack

Go back and forward between two pages

I have a website by mean-stack. I want to add a web page https://localhost:3000/A. This page contains a textarea where people could write a text, it also contains a button go forward to Page B. Thus clicking on the button leads to https://localhost:3000/B. Page B prints the text (which can not be edited) that was written in Page A. It also contains a button go back to Page A, which leads back to Page A. […]

MEAN-stack app: REST API calls from angular2 frontend to express backend do not work. Error: ERR_CONNECTION_REFUSED

I am building a MEAN stack app, following this tutorial: https://www.youtube.com/watch?v=PFP0oXNNveg&t=3236s The Problem: I try to do http.get() request from my angular2 frontend to my express backend. It does not work and i get the Error: ERR_CONNECTION_REFUSED: The Error My frontend is on localhost/4200 and my backend on localhost/3000. I figured the problem might be that, so i search for solutions and tried everything described in here: Angular-CLI proxy to backend doesn't work (solution to […]

How to change the data in script tags in html from js?

I have the following script tag in my html, <script type=”application/ld+json”> { “@context”: “http://schema.org”, “@type”: “VideoObject”, “name”: “Title”, “description”: “Video description”, “thumbnailUrl”: [ “https://www.xpertdox.com/assets/images/XperDox_Cover_Art .png” ], “uploadDate”: “2015-02-05T08:00:00+08:00”, “duration”: “PT1M51S”, “embedUrl”: “https://www.youtube.com/watch?v=LDIYgpraBHA”, “interactionCount”: “2347” } </script> I want to append values to this through my js file,like “name”: “My Title”, “description”: “My description” But i dont know how to assign values to the script tag form js.I am using angular js.Can anyone please suggest me […]

Is it possible to use router.get after having been using ngRoute?

I’ve been using Angular’s ngRoute and .when for displaying the hmtl routes of my application. For this I have configured a main route: var appRoutes = require(‘./backend/routes/api’); I was trying to add another route this way but most of the html wasn’t displaying correctly, so I configured another main route: var questions = require(‘./backend/routes/questions’); in the file where I use Angular’s ngRoute with .when, I added a route for /questions but it doesn’t load it […]

using !! symbol before the scope variable in ng-show what would represent this ( !! )symbol

what is the real meaning of using (!)before the scope variable in angularjs. ng-show=”!!file”. What would indicate if I use this symbol in angularjs ng-directives Source: AngularJS

Is it possible to have more than one ng-controller for one templateUrl when using .when?

Is it possible to have more than one ng-controller for one templateUrl when using .when? I need three different ng-controllers and two factories for the same templateUrl. I know I can have many controllers, but I don’t know how to with .when, and I need to use .when because I’m using nodejs and expressjs as well. Source: AngularJS