Core

  1. Sammy

  2. Sammy.Application

    1. $element
    2. after
    3. any
    4. around
    5. before
    6. bind
    7. bindToAllEvents
    8. clearTemplateCache
    9. contextMatchesOptions
    10. del
    11. error
    12. eventNamespace
    13. get
    14. getLocation
    15. helper
    16. helpers
    17. isRunning
    18. lookupRoute
    19. mapRoutes
    20. notFound
    21. post
    22. put
    23. refresh
    24. routablePath
    25. route
    26. run
    27. runRoute
    28. setLocation
    29. setLocationProxy
    30. swap
    31. templateCache
    32. toString
    33. trigger
    34. unload
    35. use
  3. Sammy.DefaultLocationProxy

  4. Sammy.EventContext

    1. $element
    2. engineFor
    3. eventNamespace
    4. interpolate
    5. json
    6. load
    7. notFound
    8. partial
    9. redirect
    10. render
    11. renderEach
    12. send
    13. swap
    14. toString
    15. trigger
  5. Sammy.Object

    1. escapeHTML
    2. has
    3. join
    4. keys
    5. log
    6. toHTML
    7. toHash
    8. toString
  6. Sammy.RenderContext

    1. appendTo
    2. collect
    3. interpolate
    4. load
    5. loadPartials
    6. next
    7. partial
    8. prependTo
    9. render
    10. renderEach
    11. replace
    12. send
    13. swap
    14. then
    15. trigger
    16. wait
  7. Sammy.addLogger

  8. Sammy.log

Plugins

  1. Sammy.Cache

  2. Sammy.DataCacheProxy

  3. Sammy.DataLocationProxy

  4. Sammy.EJS

  5. Sammy.Exceptional

  6. Sammy.Flash

  7. Sammy.Form

  8. Sammy.FormBuilder

  9. Sammy.GoogleAnalytics

  10. Sammy.Haml

  11. Sammy.Handlebars

  12. Sammy.Hoptoad

  13. Sammy.JSON

  14. Sammy.Meld

  15. Sammy.MemoryCacheProxy

  16. Sammy.Mustache

  17. Sammy.NestedParams

  18. Sammy.OAuth2

  19. Sammy.PathLocationProxy

  20. Sammy.Pure

  21. Sammy.PushLocationProxy

  22. Sammy.Session

  23. Sammy.Storage

  24. Sammy.Store

  25. Sammy.Store.Cookie

  26. Sammy.Store.Data

  27. Sammy.Store.LocalStorage

  28. Sammy.Store.Memory

  29. Sammy.Store.SessionStorage

  30. Sammy.Store.isAvailable

  31. Sammy.Template

  32. Sammy.Title

  33. Sammy.Tmpl

« Back

Sammy.Application runRoute ( verb, path, params, target )

First, invokes lookupRoute() and if a route is found, parses the possible URL params and then invokes the route's callback within a new Sammy.EventContext. If the route can not be found, it calls notFound(). If raise_errors is set to true and the error() has not been overriden, it will throw an actual JS error.

You probably will never have to call this directly.

Arguments

  • verb A String for the verb.
  • path A String path to lookup.
  • params An Object of Params pulled from the URI or passed directly.

Returns

Either returns the value returned by the route callback or raises a 404 Not Found error.

comments powered by Disqus