Questions tagged [mithril.js]

Mithril.js is a client-side MVC framework.

Mithril.js is a client-side MVC framework - a tool to organize code in a way that is easy to think about and to maintain.

Some features include

  • Safe-by-default templates
  • Hierarchical MVC via components
  • Virtual DOM diffing and compilable templates
  • Intelligent auto-redrawing system

Official page and resources: http://mithril.js.org/

260 questions
0
votes
1 answer

Mithril.js with multiple GET requests

My project was originally in Angular, you can see it on GitHub still. But I'm trying to switch to Mithril. I'm calling the request on the data.json file (served from GitHub Pages), which is just a list of events ordered by date (ordered at the time…
jshwlkr
  • 335
  • 6
  • 18
0
votes
1 answer

Error after adding gem 'mithril_rails'

I add gem 'mithril_rails' in my Gemfile, make bundle install and bundle update, add //= require mithril in my application.js file, type rails s and get…
Evgeny Palguev
  • 599
  • 3
  • 18
0
votes
1 answer

Why the view not redraw with m.request in Mithril?

I have this example: controller : function() { var responseFolder = m.prop(""); var pathDirectory = m.prop("C://");` function clickChangeFolder(folder) { pathDirectory(pathDirectory() + folder + "/"); …
Irrech
  • 1,277
  • 2
  • 13
  • 18
0
votes
1 answer

In Processing web service data, Why m.prop is not required?

Note that this getter-setter holds an undefined value until the AJAX request completes. var users = m.prop([]); //default value var doSomething = function() { /*...*/ } m.request({method: "GET", url: "/user"}).then(users).then(doSomething) But…
re9
  • 103
  • 2
0
votes
1 answer

mithril.js dies after m.request receives an error

This one is confusing to describe, so I'll just put a video https://dl.dropboxusercontent.com/s/ju485susn7ypsgx/2015-12-09_15-03-50.mp4?dl=0 When I turn the server off, m.request throws errors (obviously) net::ERR_CONNECTION_REFUSED How can I…
Farzher
  • 13,934
  • 21
  • 69
  • 100
0
votes
1 answer

How to create dependency with Mithril.js?

I have a long list of items that I want to show in a
    . I want to add a "filter" input, so the user can narrow down the list of items to those matching the filter. My controller contains a filter prop and a list array: function Ctrl() { …
miniml
  • 1,489
  • 2
  • 17
  • 27
0
votes
1 answer

Aggregating components in mithril

I have a top level component in my web page which aggregates other components. Now I need one component to render only when a button is pressed, i.e. a flag set in my view model. So, how should I use my top level component for this? Should I use if…
deep19
  • 81
  • 1
  • 1
  • 11
0
votes
2 answers

Improve Angular performance: change the view to reactjs or Mithril?

I have a performance issues with Angular (as many others). I wish to change only the view layer to either reactjs or Mithril. I found examples of React js (for example…
Tomer Almog
  • 3,604
  • 3
  • 30
  • 36
0
votes
2 answers

Use Mithril and Tooltipster

I'd like to include interactive content in a tooltip [that's created using Tooltipster]. A simple example: $('a').tooltipster({ contentAsHTML: true, content: 'Tooltip click me', theme: 'tooltipster-light', …
0
votes
2 answers

Mithril - Rerender dynamic content

I am trying to re render my DOM elemnets after my deferred object returns with data. I debug this on the console and it appears that my elements are getting created, however it never shows up to the page. If I add static content it works as…
0
votes
1 answer

Add editable dynamic objects to an array in Mithriljs

I have an array, that I need to populate with multiple 'properties', something like this: [ { name: 'Date', value: '27 Oct' }, { name: 'Type', value: 'Image' }, { name: 'Client', …
Such Much Code
  • 787
  • 1
  • 9
  • 26
0
votes
0 answers

Reducing impact of web service calls stalling

I have a website that calls a web service to process a list of addresses multiple times. I'd like the user to get their results faster and am already using promises and deferred to process the results. I'm sending the requests like this…
user2197446
  • 1,065
  • 3
  • 15
  • 31
0
votes
1 answer

alertify.alert doesnt work in mithril (m.request) response

i am working on a project where i am using mithril.js and also using alertify.js in the response i want to alert some data it doesnt work and if the same alert i am using before m.request it works fine function send_data() { …
Aatif Bandey
  • 1,193
  • 11
  • 14
0
votes
1 answer

m.request issues too many requests

I just started learning mithril, and I'm trying to write a simple frontend which interacts with a RESTful API. However, when I load this in the browser, the browser issues < 30 GET requests to '/posts' per second! I'm not sure if this is an error in…
mt_caret
  • 1
  • 1
0
votes
1 answer

API mocking in Mithril for front-end development, like jquery-mockjax

I am using mithril in an IoT framework. I am trying to isolate the front-end development from backend API implementation tasks. In jQuery, I have used jQuery-mockjax and a similar mechanism in Angular. What I understand is that those libraries…
Sajith
  • 106
  • 5