BackboneJS教學
BackboneJS環境設置
BackboneJS應用
BackboneJS事件
BackboneJS事件on
BackboneJS事件off
BackboneJS事件trigger
BackboneJS事件once
BackboneJS事件listenTo
BackboneJS事件stopListening
BackboneJS事件listenToOnce
BackboneJS模型
BackboneJS Model.extend()方法
BackboneJS Model.initialize()方法
BackboneJS Model.get()方法
BackboneJS Model.set()方法
BackboneJS model.escape()方法
BackboneJS model.has()方法
BackboneJS model.unset()方法
BackboneJS model.clear()方法
BackboneJS model.id屬性
BackboneJS model.idAttribute屬性
BackboneJS model.cid屬性
BackboneJS model.attributes屬性
BackboneJS model.changed
BackboneJS model.defaults
BackboneJS model.toJSON()方法
BackboneJS model.sync()方法
BackboneJS model.fetch()方法
BackboneJS model.save()方法
BackboneJS model.destroy()方法
BackboneJS model.validate()方法
BackboneJS model.validationError
BackboneJS model.isValid()方法
BackboneJS model.url()方法
BackboneJS model.urlRoot()方法
BackboneJS model.parse()方法
BackboneJS model.clone()方法
BackboneJS model.hasChanged()方法
BackboneJS model.isNew()方法
BackboneJS model.changedAttributes()方法
BackboneJS model.previous()方法
BackboneJS model.previousAttributes()方法
BackboneJS集合
BackboneJS Collection.extend()方法
BackboneJS Collection.model
BackboneJS 集合初始化
BackboneJS collection.models
BackboneJS collection.toJSON()方法
BackboneJS collection.sync()方法
BackboneJS collection.add()方法
BackboneJS collection.remove()方法
BackboneJS collection.reset()方法
BackboneJS collection.set()方法
BackboneJS collection.get(id)方法
BackboneJS collection.at()方法
BackboneJS collection.push()方法
BackboneJS collection.pop()方法
BackboneJS collection.unshift()方法
BackboneJS collection.shift()方法
BackboneJS collection.slice()方法
BackboneJS collection.length
BackboneJS collection.comparator屬性
BackboneJS collection.sort()函數
BackboneJS collection.pluck()方法
BackboneJS collection.where()方法
BackboneJS collection.findWhere()方法
BackboneJS collection.url()方法
BackboneJS collection.parse()方法
BackboneJS collection.clone()方法
BackboneJS collection.fetch()方法
BackboneJS collection.create()方法
BackboneJS路由
BackboneJS router.execute()方法
BackboneJS router.routes
BackboneJS Router初始化
BackboneJS router.navigate()方法
BackboneJS router.route()方法
BackboneJS Backbone.history.start()方法
BackboneJS同步
BackboneJS .sync()方法
BackboneJS Backbone.emulateHTTP
BackboneJS Backbone.emulateJSON
BackboneJS視圖
Backbone.View.extend()方法
BackboneJS視圖初始化
BackboneJS view.el
BackboneJS view.$el
BackboneJS view.setElement()方法
BackboneJS view.attributes
BackboneJS view.$(selector)方法
BackboneJS view.template(data)方法

BackboneJS路由

路由器用於路由客戶端應用程序和應用程序定義的對象的URL表示。當Web應用程序提供可鏈接,可標記,可共享的URL的應用程序,重要位置路由器是必需的。

下表列出了下來,可用於操縱路由器的BackboneJS方法 :

S.N.

方法& 描述

1

extend
擴展了backbone的router類。

2

routes
定義了應用程序對象的URL表示。

3

initialize
創建爲路由器實例化新的構造函數。

4

route
爲路由器創建路由。

5

navigate
被用於更新應用程序的URL。

6

execute
用來當路由其相應的回調相匹配。