Questions tagged [angular-loopback]
60 questions
0
votes
1 answer
Loopback CLI created PersistedModel properites not working when model json updated
I've created a model using below command line tool in mac terminal and created model name with PersistedModel.
lb model
I've got respective json and js file for model and json structure looks as follows.
{
"name": "otp",
"base":…

Vishnu
- 2,243
- 2
- 21
- 44
0
votes
2 answers
Pass access token in header instead of url loopback
I am new to LoopBack. I have used it's default server authentication.
module.exports = function enableAuthentication(server) {
// enable authentication
server.enableAuth();
};
After this i am getting access token from login api.
Then i have to…

Ankur Akvaliya
- 2,989
- 4
- 28
- 53
0
votes
2 answers
TypeError: instances.map is not a function angular loopback
I'm using the @mean-expert/loopback-sdk-builder to generate my api on angular 4.3.6 and i am getting an error when i use this call
this._userApi.findUsersByRoles([{'name':'cliente'}]).subscribe((users: User[]) => {
this.users = users;
}, (err)…

Edlop
- 11
- 6
0
votes
3 answers
how do I add an image to a loopback model?
I created a blog post using mongodb(mlab), loopback, and angular 4 and I am able to display my posts on my angular 4 site, however I do not know how to add an image to my loopback model seen here as json:
{
"title": "string",
"author":…

kingx26
- 25
- 2
- 8
0
votes
1 answer
Cannot read property 'call' of undefined at Resource.LoopBackResource.resource.$save
I am trying to use loopback angular resource for website part. it seems $save on model gives error Cannot read property 'call' of undefined at Resource.LoopBackResource.resource.$save. i can't seem to find any answers.
I am working on angular…

Taj Ahmed
- 895
- 11
- 19
0
votes
1 answer
Loopback Angular error
I can see this error when login page is loading.
"Error: [$resource:badcfg] Error in resource configuration for action find. Expected response to contain an array but got an object (Request: GET http://api.somedomain.com/v1/Applications)
I can't…
user7758399
0
votes
1 answer
Angular 2 (4) What's the way to manage response for multiple async calls
I have a simple question, how I can manage response for simultaneous async calls?
Explain: I have a loop of array json with typescript, and I call a Loopback Api in each iteration:
for (var i = 0; i < data.length; ++i) {
…

Rodrigo
- 43
- 1
- 7
0
votes
1 answer
Angular-Loopback-SDK: prototype$updateAttributes is not a function
I'm using the loopback-angular-sdk and I am getting a weird error when using the updateAttributes function:
MyModel.prototype$updateAttributes is not a function
It happens on all models. I'm kind of suspecting an dependency issue.
I included the…

Biffy
- 871
- 2
- 10
- 21
0
votes
1 answer
Loopback Angular SDK Login Issue
I created a "user" named model with base class "User". I'm trying to login a user in Angular App using lb-ng generated service but it's not logging in.
In my Login controller I invoked User.login() providing email and password but its giving some…

Shahrukh Shahid
- 418
- 4
- 16
0
votes
1 answer
Loopback AngularJS Get _id field from MongoDB Collection
Loopback AngularJS SDK and Get Data
I'm newer with Loopback.js
I have a lot of collection in MongoDB and I thought index field is the best way to relationship with two collection.
For example,
I have two collections. These are Projects and…

Joey Goksu
- 31
- 6
0
votes
1 answer
How do I stop storage containers being emptied when deploying a new version of my strongloop project?
I have various storage containers created in './client/storage' in my project.
When I deploy my project these containers are duplicated on the server in '/var/lib/strong-pm/svc/1/work/current/client/storage/'. If I do some uploads the files are…

louisl
- 99
- 1
- 10
0
votes
1 answer
loopback - query related model
I have a Client model with hasMany relation to Instrument model through InstrumentTracking model (that is a "through" relation).
How do I get all the instruments of a specific Client from a controller code?
I tried using client.instruments which…

Gilad Baruchian
- 930
- 3
- 14
- 30
0
votes
2 answers
Loopback AngularJS JavaScript SDK - Gruntfile plugin
I'm following literally the official loopback documentation for AngularJS Grunt plugin and I'm facing a problem during the creation of the task under the Grunt file.
The documentation is well done and In the How to use the plugin section it provides…

Andrea Grimandi
- 631
- 2
- 8
- 32
0
votes
1 answer
$elemMatch query in looback-angularjs sdk with loopback-mongodb-connector?
I have a collection called Dish in mongodb the sample data is -
[{
"_id": ObjectId("56c839b969431a9913cafa65"),
"name": "Dish 01",
"description": "Dish 01 description",
"ingredients": [{
"id": "56c4a40bf97c039d44e89185",
"name": "onion",
},…

Sparsh Pipley
- 451
- 8
- 22
-1
votes
1 answer
Angular6 + Loopback : "isAuth" What the best way to not write the same code in each component ?
I'm testing angular6 + loopback...
At my step, I'm able to create my account and login, so I get back an user object with the informations of the logged user...
In my templates, I have some items I want to show only for logged users. So I make a…

Mike5
- 61
- 11