mean-stack

Heroku Mixed content HTTPS/HTTP issue

青春壹個敷衍的年華 提交于 2019-12-14 03:46:22
问题 I deployed my app to Heroku and I keep getting this error in the Chrome console: bundle.js:11892 Mixed Content: The page at 'https://***.herokuapp.com/#/login' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://localhost:3000/login'. This request has been blocked; the content must be served over HTTPS.(anonymous function) @ bundle.js:11892sendReq @ bundle.js:11653serverRequest @ bundle.js:11363processQueue @ bundle.js:16097(anonymous function) @ bundle.js

Supplied parameters do not match any signature of call target on api call angular4

痞子三分冷 提交于 2019-12-14 02:24:50
问题 I am consuming an api to Covalent UI, on user service. Which needs to post some data from an endpoint to the table as illustrated on the example from the GitHub. Here is the modification I have made to the service. import { Provider, SkipSelf, Optional, InjectionToken } from '@angular/core'; import { Response, Http } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import { HttpInterceptorService, RESTService } from '@covalent/http'; import { ApiService } from '../../../..

MEANStack Angular Table - Sorting and Pagination Functionalities

一个人想着一个人 提交于 2019-12-13 23:07:16
问题 I'm developing a WebApp with MEANStack, currently working on the Front End with Angular. My App simply reads SQL Data Tables and displays them on a browser in the form of Angular Tables. Here's how it looks like: Data Table Display MEANStack App Unfortunately the Sort functionality does not work. Any idea why? Furthermore, how can I implement the "scroll left and right" functionality, given that my tables are a bit large? Here's my code (Please do not hesitate to ask for more code): tables

How to show contents of a card on a separate page [Angular]

倾然丶 夕夏残阳落幕 提交于 2019-12-13 20:14:20
问题 I'm new to Angular. I may not be able to frame the question correctly. But please let me explain. I've created a MEAN application. Its is deployed on heroku . Here is the link. If you click on any card i.e Read more button, you'll auto scroll to a div where contents are displayed. But I want this content to be displayed on a separate fresh page because I'm planning to associate other features such as Like , Upvote , Report etc. Please show me some direction. PS: Here is the github repo. I've

How to create a character counter for textarea ? (angular)

元气小坏坏 提交于 2019-12-13 08:27:55
问题 CODE: <div class="form-group"> <label class="control-label" for="content">Content</label> <textarea name="content" data-ng-model="vm.article.content" id="content" class="form-control" cols="30" rows="10" placeholder="1400 characters long at least" required ng-minlength="1400" ng-maxlength="14000" highlight-on-error></textarea> <!--counter--> <br> <span class="form-help">{{1400-vm.article.content.length}} Characters</span> <div ng-messages="vm.form.articleForms.content.$error" role="alert"> <p

return resolve error in node function

喜欢而已 提交于 2019-12-13 08:09:34
问题 Why wont usernametoid function return the acual id? cause im trying to send the result of the userdata as the return. In this case, i want to only send the userdata`s _id attribute. but it seems like it wont work. console.log(userdata._id); // works return resolve(userdata._id); // wont work. output of variable userdata: { cash: 7300002, bank: 0, xp: 0, rank: 1, points: 1, location: 1, health: 100, protection: 1, attack: 1, family: '0', password: 'jKa4qC7pRCgE5jvzD9Vv1pRUNxFlQEM7Jpq/IoJ

Mongoose query nested document returns empty array

点点圈 提交于 2019-12-13 06:50:37
问题 I have these schemas: var Store = mongoose.model('Store', new Schema({ name: String })); var Client = mongoose.model('Cllient', new Schema({ name: String, store: { type: Schema.ObjectId, ref: 'Store' } })); var Order = mongoose.model('Order', new Schema({ number: String, client: { type: Schema.ObjectId, ref: 'Client' } })); I'm trying to code the Url handler of the API that returns the order details, which looks like this: app.get('/api/store/:storeId/order/:orderId', function (...)); I'm

Understanding the MEAN stack [closed]

岁酱吖の 提交于 2019-12-13 04:25:01
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . Just a quick question. I have searched for a user group to post this in a more suitable location to no avail. I am getting familiar with the MEAN stack: https://github.com/linnovate/mean However I cannot see the reason for the separation into .jade templates under app/views,

Angular passing $scope data into PUT request

烈酒焚心 提交于 2019-12-13 03:59:41
问题 I'm working on a mean stack crud and am close having it fully functional but am stuck trying to pull in the actual data from the form fields. I currently have the array values hard coded, which works but I'd like to replace the 'edited' with the entered form field values. My angular PUT request: $scope.editService = function(id) { $http.put('/api/hc/' + id, {title: 'edited', shortname: 'edited', summary: 'edited', description: 'edited'} ) .success(function(data) { }) .error(function(data) {

Mongoose - find objects which are NOT IN another list of objects

不打扰是莪最后的温柔 提交于 2019-12-13 03:48:57
问题 A few days ago I posted this question. Since I didn't find a working solution, I've changed my app's structure a bit and that's why I'm posting this new question. There are User and Task models. A User contains two lists of Tasks , and those are tasksAssigned and tasksCompleted : user.model.js const mongoose = require("mongoose"); const autopopulate = require("mongoose-autopopulate"); const UserSchema = mongoose.Schema({ username: String, password: String, firstName: String, lastName: String,