# Category: mean-stack

## 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

## angularjs notification like facebook

I’ve already finished my mean stack project but now i want to add a notification service, but i don’t know where to start. I already read some tutorials but they’re too confusing for me. routes.js router.post(‘/usersv2’, function (req, res) { var user = new Userv2(); user.userId = req.body.userId; user.password = req.body.password; user.firstname = req.body.firstname; user.lastname = req.body.lastname; user.address = req.body.address; user.contactInfo = req.body.contactInfo; user.email = req.body.email; user.department = req.body.department; user.position = req.body.position; user.emploID = req.body.emploID; […]

## How to pass a parameter from angular 2 service to node js function? MEAN

I have a posts collection and each post has an id and userId. I want to find all posts for a specific user (using userId property).. here is my angular2 service: export class PostsService { private _url = ‘/api/posts’; constructor(private _http: Http) { } getPosts(): Observable<Post[]> { return this._http.get(this._url).map(res => res.json()); } getUserPosts(userId: number) { return this._http.get(this._url + ‘/’ + userId).map(posts => posts.json()); } } and my nodejs code : router.get(‘/posts’, function(req, res) { post.find({}).exec(function(err, […]

## How to unset a field in Mongoose with findByIdAndUpdate [duplicate]

This question already has an answer here: Mongoose overwrite the document rather that $set fields 2 answers I use MEAN stack. On my backend I use findByIdAndUpdate function in Mongoose to do the update operation in CRUD. I also use Bootstrap UI date picker. On “clearing” of the date, uib-datepicker-popup resets the scope value for the date field to undefined. Now I pass the scope resource object into Mongoose with a HTTP PUT angular$resource […]

## Tying angular files together

I am new to Angular and have done some tutorials but am now getting to working on my own project, using John Popa style guide. My question is: if you have one component per file, how do you tie it together? Do I need to call the script src of every individual file in the HTML? Source: AngularJS

## Angular ToDo App [on hold]

I am learning Angular, so I am trying to fully develop an Angular ToDo App that enables users to create, update and delete tasks, saving them into a Mongo database. The app is making progress, the angular logic works in the browser memory but I am having a hard time making it work with my Mongo database. Right now I can insert data into it through the “Create” state, but I can’t figure out how […]

## How to build a GIS server using MEAN stack? [on hold]

I am trying to build a GIS server using MEAN stack which handles geospatial data. my input requirements are uploading and retrieving shapefile/rasters in mongoDB. Tutorial links and suggestions are welcomed. Thank you in advance. Source: AngularJS

## MEAN 2 Multi Tenant App. Form to create 2 different models

In my quest to learn the MEAN stack i’m building a small multi tenanted app and struggling with getting my users / tenants all signed up. Backend is sorted I believe just cant quite figure out how to get angular to play ball. Flow… User signs up a new account, Which concurrently creates a new tenant. Like so… var express = require(‘express’); var router = express.Router(); var bcrypt = require(‘bcryptjs’); var Tenant = require(‘../models/tenant’); var […]

## Angular-Ui-tour or bootstrap tour guide how to work with these

I want to implement tour guide to my website.I am working on Mean stack for the purpose.I have checked a bunch of website to get exact idea how to implement any of the above but couldn’t. Can anyone help me with complete instructions to get this thing done. -need to know about the code in the controller and view -make sure that it works once for a particular user. Source: AngularJS