angular bootstrap timepicker TypeError提示怎么辦
angular bootstrap timepicker TypeError: Cannot set property '$render' of undefined,如何解決?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.css" rel="external nofollow" > <link rel="stylesheet" href="node_modules/angular-bootstrap-datetimepicker/src/css/datetimepicker.css" rel="external nofollow" /> </head> <body ng-app="MyApp"> <p>{{mode}}</p> <datetimepicker data-ng-model="mode"></datetimepicker> </body> <script type="text/javascript" src="node_modules/moment/moment.js"></script> <script type="text/javascript" src="node_modules/angular/angular.js"></script> <script type="text/javascript" src="node_modules/angular-bootstrap-datetimepicker/src/js/datetimepicker.js"></script> <script type="text/javascript" src="node_modules/angular-bootstrap-datetimepicker/src/js/datetimepicker.templates.js"></script> <script type="text/javascript" src="locales/bootstrap-datetimepicker.zh-CN.js"></script> <script> var myAppModule = angular.module('MyApp', ['ui.bootstrap.datetimepicker']) </script> </html>
package.json
{ "name": "cynthia", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "angular-bootstrap-datetimepicker": "^1.1.4", "bootstrap": "^3.3.7" } }
把以上兩個(gè)文件放到同一目錄
npm install
運(yùn)行index.html文件就可以看到效果了。
如果出現(xiàn):TypeError: Cannot set property '$render' of undefined
說(shuō)明angular的版本太低,這個(gè)版本要求至少在v1.2.30以上.
github傳送門(mén):https://github.com/raomojiuran/angular-bootstrap-datetimepicker
github:https://github.com/cynthiawupore
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
- Bootstrap時(shí)間選擇器datetimepicker和daterangepicker使用實(shí)例解析
- angularjs封裝bootstrap時(shí)間插件datetimepicker
- bootstrap datetimepicker日期插件使用方法
- bootstrap-datetimepicker實(shí)現(xiàn)只顯示到日期的方法
- Bootstrap3 datetimepicker控件使用實(shí)例
- bootstrap datetimepicker日期插件超詳細(xì)使用方法介紹
- 仿Angular Bootstrap TimePicker創(chuàng)建分鐘數(shù)-秒數(shù)的輸入控件
- 基于bootstrap-datetimepicker.js不支持IE8的快速解決方法
- bootstrap datetimepicker實(shí)現(xiàn)秒鐘選擇下拉框
- AngularJs中Bootstrap3 datetimepicker使用實(shí)例
相關(guān)文章
js判斷登陸用戶(hù)名及密碼是否為空的簡(jiǎn)單實(shí)例
下面小編就為大家?guī)?lái)一篇js判斷登陸用戶(hù)名及密碼是否為空的簡(jiǎn)單實(shí)例。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2016-05-05ES6擴(kuò)展運(yùn)算符的用途實(shí)例詳解
這篇文章主要介紹了ES6擴(kuò)展運(yùn)算符的用途 ,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2017-08-08基于JavaScript實(shí)現(xiàn)輪播圖代碼
在前端程序開(kāi)發(fā)中,經(jīng)常會(huì)實(shí)現(xiàn)js輪播圖的效果,怎么實(shí)現(xiàn)的呢?下面小編給大家分享基于基于JavaScript實(shí)現(xiàn)輪播圖代碼 ,非常不錯(cuò),感興趣的朋友可以參考下2016-07-07js實(shí)現(xiàn)內(nèi)置計(jì)時(shí)器
這篇文章主要為大家詳細(xì)介紹了js實(shí)現(xiàn)內(nèi)置計(jì)時(shí)器,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2019-12-12javascript實(shí)現(xiàn)的動(dòng)態(tài)文字變換
javascript實(shí)現(xiàn)的動(dòng)態(tài)文字變換...2007-07-07js實(shí)現(xiàn)簡(jiǎn)單進(jìn)度條效果
這篇文章主要為大家詳細(xì)介紹了js實(shí)現(xiàn)簡(jiǎn)單進(jìn)度條效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2020-03-03基于Leaflet的Webgis經(jīng)緯網(wǎng)格功能實(shí)現(xiàn)
本文將介紹一款Leaflet的經(jīng)緯網(wǎng)插件,基于這款經(jīng)緯網(wǎng)插件,詳細(xì)介紹如何實(shí)現(xiàn)經(jīng)緯網(wǎng)功能,本文通過(guò)實(shí)例代碼給大家介紹的非常詳細(xì),感興趣的朋友跟隨小編一起看看吧2023-12-12JS判斷網(wǎng)頁(yè)廣告是否被瀏覽器攔截過(guò)濾的代碼
這篇文章主要介紹了JS判斷網(wǎng)頁(yè)廣告是否被瀏覽器攔截過(guò)濾的代碼,需要的朋友可以參考下2015-04-04js省市聯(lián)動(dòng)效果完整實(shí)例代碼
這篇文章主要介紹了js省市聯(lián)動(dòng)效果完整實(shí)例代碼,涉及JavaScript數(shù)組的定義與遍歷技巧,代碼非常具有實(shí)用價(jià)值,需要的朋友可以參考下2015-12-12