Created
June 26, 2016 20:07
-
-
Save matiasfha/b33c253a1997a9c211d5b04aea024505 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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