javascript - mgcrea.ngStrap datepicker issue -
i've got issue datepicker mgcrea.ngstrap library.
layout file:
<html lang="en-us" ng-app="ftc"> <head> <script src="/assets/2db3448a/components/angular.js/angular.min.js"></script> <script src="https://code.angularjs.org/1.4.8/angular-animate.min.js"></script> <script src="/assets/2db3448a/components/angular-route/angular-route.min.js"></script> <script src="/assets/2db3448a/mgcrea/angular-strap/dist/angular-strap.min.js"></script> <script src="/assets/2db3448a/mgcrea/angular-strap/dist/angular-strap.tpl.min.js"></script> <!-- i'm including rest of js libs (anguvideo, googlemaps dependencies, etc. i'm including stylesheets (bootstrap too) --> </head> <body ng-controller="applicationcontroller appctrl"> <!-- navbar here --> <div class="container"> <div ng-view></div> </div> <!-- static footer --> <script src="/assets/60113bca/jquery.min.js"></script> <script src="/js/app.js"></script> <script src="/js/controllers/application-controller.js"></script> <script src="/js/controllers/event-create.js"></script> <!-- other js files --> </body> </html>
i've tried jquery moved head section result same.
the app definition (app.js):
angular.module('ftc', [ 'ngroute', 'nganimate', 'mgcrea.ngstrap', 'anguvideo', 'uigmapgoogle-maps']) .config(['$routeprovider', '$httpprovider', 'uigmapgooglemapapiprovider', function($routeprovider, $httpprovider, uigmapgooglemapapiprovider) { // here routing , google maps config }]);
controller (event-create.js):
angular.module('ftc') .controller('eventcreatecontroller', ['$location', '$http', '$scope', 'uigmapgooglemapapi', function($location, $http, $scope, uigmapgooglemapapi){ //there google maps api code ... }]);
view file (create.html) here i've got form , google map preview. there 10 inputs , 1 i'm trying use ngstrap.datepicker
directives, code follow:
<form ng-submit="eventctrl.add()" name="eventform" id="event-form" method="post" role="form" novalidate> <div class="form-group required col-lg-6"> <label for="startdate" class="control-label sr-only">poczÄ…tek wydarzenia</label> <input ng-model="event.startdate" type="text" id="startdate" class="form-control" name="startdate" bs-datepicker required> </div> <!-- , there rest of form --> </form>
the problem:
in chrome js console i've got error:
https://docs.angularjs.org/error/$injector/unpr?p0=$$rafprovider%20%3c-%20$$raf%20%3c-%20$tooltip%20%3c-%20$datepicker%20%3c-%20bsdatepickerdirective
all others libs work fine ('ngroute', 'anguvideo', 'uigmapgoogle-maps'
). libs installed via composer (the app writen php yii2 framework).
libs versions: angularjs: 1.2.0; mgcrea.ngstrap: 2.3.6.
any idea i'm missing?
cheers, kamil
from code have shown don't appear loading template js part of library: angular-strap.tpl.js
if load script file error disappear? if don't include templates come library have write own , include them instead.
Comments
Post a Comment