Questions tagged [ember-model]

Ember Model (EM) is a simple and lightweight model library for Ember.

Ember Model (EM) is a simple and lightweight model library for Ember. It intentionally supports a limited feature set. The main goal is to provide primitives on top of $.ajax that are required by Ember.

EM is still very much a work in progress, but it's flexible enough to be used in apps today. It was extracted out of an Ember app. Please see the issues section for a list of bugs and planned features.

Github repository

135 questions
0
votes
2 answers

ember data model is not reloading even after queryParams is changing

I want my model to reload when the queryParams has changed. queryParams change is reflecting in the URL but model reload is not happening. I followed the ember.js guides (https://guides.emberjs.com/v2.6.0/routing/query-params/) on making full-on…
iOS dev
  • 470
  • 7
  • 23
0
votes
1 answer

Accessing a model collection in controller - Ember2.5

When trying to access the model of a controller when creating a computed property on the controller, I get the following error: model.uniqBy is not a function app/controller/ticket.js export default Ember.Controller.extend({ statuses:…
a7omiton
  • 1,597
  • 4
  • 34
  • 61
0
votes
2 answers

concatenating string in the property being observed in the observer

I have a component in which I am observing a property from model and model is fed to controller in controller setup as controller property 'model'. Model has properties age, salary, rank. The property in component is to be entered by user. The…
Vijay Malik
  • 107
  • 1
  • 1
  • 10
0
votes
1 answer

How to refresh the current route without refreshing the parent(application) route

i have a home route and when i refresh the page on the browser instead of calling the model and only refreshing the current route, it refreshes the parent(application) route. Is there any way to just refresh my home route?
user5471528
  • 217
  • 2
  • 9
0
votes
3 answers

Ember model with session data

I have a problem with ember when I want to use a session data (companyId that is assigned to a user) in a model. I am using ember-cli and ember 0.13.1 with ember-simple-auth. Lets say I have a route called user/profile when I want to show…
0
votes
1 answer

EmberJS - Rendering separate route as a modal into a specific outlet

In my EmberJS applications I have two separates routes as follows, Route A - "main/books/add" Route B - "main/authors/add" I have an "Add Authors" button In Route A template and when a user presses that button I want to load and render Route B in a…
PIKP
  • 753
  • 2
  • 15
  • 24
0
votes
1 answer

values from model are not updating to the view

I have displayed a textbox using Ember.View. In model i had specified all the details of the input. App.Display = DS.Model.extend({ inputText: DS.attr('string'), width: DS.attr('string'), height: DS.attr('string'), className:…
bvakiti
  • 3,243
  • 4
  • 17
  • 26
0
votes
1 answer

Ember: Setting model to undefined on empty strings

There is a form on the template and when submit is pressed, it hits an action in the controller. When a user types something and deletes it, the binded property will be an empty string instead of undefined. I used the below to solve this problem,…
holyxiaoxin
  • 690
  • 1
  • 7
  • 26
0
votes
0 answers

trouble installing ember model to ember cli app

I'm running an ember cli app. I'm trying to install ember-model since it suits my api better than ember data; however, I keep running into problems. The console inspector says that ember-model is installed but gives me the error of it can't find the…
ThreeAccents
  • 1,822
  • 2
  • 13
  • 24
0
votes
1 answer

Same origin policy when developing on local machine

Im using Ember and Ember-Model to develop a front end which is calling a Spring/Rest/MongoDB back end, which is all running on my local machine for development purposes, but I get the same origin policy error for my call. I want to know what the…
Peter S
  • 351
  • 1
  • 3
  • 13
0
votes
1 answer

Ember model find records without server request

I have an ember model Category: export default DS.Model.extend({ name: DS.attr('string'), img: DS.attr('string'), url: DS.attr('string'), cnt: DS.attr('number'), // parent_id: DS.belongsTo('category', { // inverse: 'children', // …
Emi
  • 1,018
  • 9
  • 13
0
votes
0 answers

Ember js transition and refresh when entered into the routed page

I am using ember model in my ember app and in the view I perform some logic in the didInsertElement hook of the ember view - // changing a field in the db via ajax and then this.get('controller').transitionToRoute('courses'); Now when I go to…
Ajey
  • 7,924
  • 12
  • 62
  • 86
0
votes
0 answers

Extending an Ember model with a custom variable

My Ember App has a Section Model. It has a 'name' field and I've extended it with a 'summary_of_changes' field. When I attempt to get the length of the name field all is good. Attempts to get the length of the 'summary_of_changes' field is…
Evolve
  • 8,939
  • 12
  • 51
  • 63
0
votes
0 answers

Ember.js make model of embedded / sideloaded data

To use ember validations I need to make a model of embedded data. I use Ember CLI. The JSON looks something like this: { "endpoint": { "name": "Name of form", "form_settings": { "id": 2, "setting_one": "Setting 1" }, …
0
votes
1 answer

How to set an API url for Ember Model

I'm using Ember Model and I would like to set up a URL prefix for all my models, instead of prepending them on each model like this: App.MyModel = Ember.Model.extend({ id: attr(), myAttr: attr() }); App.MyModel.reopenClass({ url: ajaxUrl +…
silvenon
  • 2,068
  • 15
  • 29
1 2 3
8 9