Skip to content

Instantly share code, notes, and snippets.

@matiasfha
Created June 26, 2016 20:07
Show Gist options
  • Save matiasfha/b33c253a1997a9c211d5b04aea024505 to your computer and use it in GitHub Desktop.
Save matiasfha/b33c253a1997a9c211d5b04aea024505 to your computer and use it in GitHub Desktop.
module Model exposing (..)
import Routing
import Components.Productos.Model as Products
type alias Model =
{ route: Routing.Route
, products: Products.Model
}
initialModel : Routing.Route -> Model
initialModel route =
{ route = route
, products = Products.init }
moudule Components.Products.Model exposing (..)
import Exts.RemoteData exposing (..)
type alias Product =
{id : Int
,image: String
,title: String
,description: String
,price: Int
,quality: String
}
type alias Model =
{ products: WebData (List Product)
}
init : Model
init =
{ products = NotAsked
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment