Home > Web Front-end > JS Tutorial > What should I do if there is an error in angular bootstrap?

What should I do if there is an error in angular bootstrap?

零下一度
Release: 2017-06-26 09:44:44
Original
1473 people have browsed it
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.css">
    <link rel="stylesheet" href="node_modules/angular-bootstrap-datetimepicker/src/css/datetimepicker.css"/>
</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>
Copy after login
package.json
Copy after login
{  "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"
  }
}
Copy after login

Put the above two files into the same directory

npm install
Copy after login

Run index.html You can see the effect of the file.

If: TypeError: Cannot set property '$render' of undefined

It means that the version of angular is too low, this version requires at least v1.2.30 or above.

github portal:

The above is the detailed content of What should I do if there is an error in angular bootstrap?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template