Closed newmesiss closed 9 years ago
I need more info than that, are there any errors in the console? Can you share the code with me?
hello yeah, look do the following.
so this made my app . within bower_components\angular-bootstrap-calenda is the app you you made .
My code is so, in my app integrates the module .
angular.module('myApp', [
'ngRoute',
'myApp.home',
'myApp.welcome',
'mwl.calendar'
]).
config(['$routeProvider', function($routeProvider) {
// Set defualt view of our app to home
$routeProvider.otherwise({
redirectTo: '/home'
});
}])
AND ADD dependencies in my index.html
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="en" ng-app="myApp" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en" ng-app="myApp" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My AngularJS App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="app.css">
<script src="js/modernizr-2.8.3.min.js"></script>
</head>
<body>
<div ng-view></div>
<script src="bower_components/angular/angular.js"></script>
<script src="https://code.angularjs.org/1.2.9/angular-route.js"></script>
<script src="https://code.angularjs.org/1.3.13/angular-cookies.js"></script>
<link rel="stylesheet" href="bower_components/angular-bootstrap-calendar/dist/css/angular-bootstrap-calendar.min.css">
<script src="bower_components/angular-bootstrap-calendar/dist/js/angular-bootstrap-calendar-tpls.min.js"></script>
<script src="https://cdn.firebase.com/js/client/2.1.0/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/angularfire/0.9.1/angularfire.min.js"></script>
<script src="https://cdn.firebase.com/js/simple-login/1.6.2/firebase-simple-login.js"></script>
<script src="app.js"></script>
<script src="home/home.js"></script>
<script src="welcome/welcome.js"></script>
<script src="components/version/version.js"></script>
<script src="components/version/version-directive.js"></script>
<script src="components/version/interpolate-filter.js"></script>
</body>
</html>
the error:
You need the UI bootstrap library as well: http://angular-ui.github.io/bootstrap/
listo, ahora arranco.
si yo agrego <mwl-calendar
automaticamente se veria el calendario?
<!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" href="http://getbootstrap.com/favicon.ico">
<title>Dental Horario</title>
<link href="http://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<link href="blog.css" rel="stylesheet">
</head>
<body ng-controller="WelcomeCtrl">
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="">Home <span class="sr-only">(current)</span></a></li>
<li><a ng-click="logout()">Cerrar</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container">
<mwl-calendar
calendar-events="events"
calendar-view="calendarView"
calendar-current-day="calendarDay"
calendar-control="calendarControl"
calendar-event-click="eventClicked($event)"
calendar-edit-event-html="'<i class=\'glyphicon glyphicon-pencil\'></i>'"
calendar-delete-event-html="'<i class=\'glyphicon glyphicon-remove\'></i>'"
calendar-edit-event-click="eventEdited($event)"
calendar-delete-event-click="eventDeleted($event)"
calendar-auto-open="true"
></mwl-calendar>
</div>
<footer class="footer">
<div class="container">
<p class="text-muted"></p>
</div>
</footer>
</body></html>
Your original code was correct, you just need to add to links to the bootstrap CSS and the angular port of the bootstrap javascript
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.0/ui-bootstrap-tpls.min.js">
asi lo realice, pero no se visualiza nada
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="en" ng-app="myApp" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en" ng-app="myApp" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>My AngularJS App</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="app.css">
<script src="js/modernizr-2.8.3.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
</head>
<body>
<div ng-view></div>
<script src="bower_components/angular/angular.js"></script>
<script src="https://code.angularjs.org/1.2.9/angular-route.js"></script>
<script src="https://code.angularjs.org/1.3.13/angular-cookies.js"></script>
<link rel="stylesheet" href="bower_components/angular-bootstrap-calendar/dist/css/angular-bootstrap-calendar.min.css">
<script src="bower_components/angular-bootstrap-calendar/dist/js/angular-bootstrap-calendar-tpls.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.0/ui-bootstrap-tpls.min.js">
</script>
<script src="https://cdn.firebase.com/js/client/2.1.0/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/angularfire/0.9.1/angularfire.min.js"></script>
<script src="https://cdn.firebase.com/js/simple-login/1.6.2/firebase-simple-login.js"></script>
<script src="app.js"></script>
<script src="home/home.js"></script>
<script src="welcome/welcome.js"></script>
<script src="components/version/version.js"></script>
<script src="components/version/version-directive.js"></script>
<script src="components/version/interpolate-filter.js"></script>
</body>
</html>
welcome
<div ng-controller="WelcomeCtrl">
<mwl-calendar
calendar-events="events"
calendar-view="calendarView"
calendar-current-day="calendarDay"
calendar-control="calendarControl"
calendar-event-click="eventClicked($event)"
calendar-edit-event-html="'<i class=\'glyphicon glyphicon-pencil\'></i>'"
calendar-delete-event-html="'<i class=\'glyphicon glyphicon-remove\'></i>'"
calendar-edit-event-click="eventEdited($event)"
calendar-delete-event-click="eventDeleted($event)"
calendar-auto-open="true"
></mwl-calendar>
</div>
What are the contents of your javascript files?
en welcome,js tengo un controlador y ese tiene eventos.
'use strict';
angular.module('myApp.welcome', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/welcome', {
templateUrl: 'welcome/welcome.html',
controller: 'WelcomeCtrl'
});
}])
.controller('WelcomeCtrl', ['$location','$scope', '$firebase','$cookies', 'auth', function($location,$scope, $firebase, $cookies, auth) {
$scope.events = [
{
title: 'My event title', // The title of the event
type: 'info', // The type of the event (determines its color). Can be important, warning, info, inverse, success or special
starts_at: new Date(2013,5,1,1), // A javascript date object for when the event starts
ends_at: new Date(2014,8,26,15), // A javascript date object for when the event ends
editable: false, // If calendar-edit-event-html is set and this field is explicitly set to false then dont make it editable
deletable: false // If calendar-delete-event-html is set and this field is explicitly set to false then dont make it deleteable
}
];
You are missing some additional variables, as can be found here: http://mattlewis92.github.io/angular-bootstrap-calendar/docs/scripts/controllers/main.js
Namely
$scope.calendarView = 'month';
$scope.calendarDay = new Date();
The calendar will now inform you when this variable isn't set @https://github.com/mattlewis92/angular-bootstrap-calendar/commit/9c369fdc1e1d66442732a019ddeed43d5854891b
para utilizar esta librería tengo que hacer referencia a todos los javascrit que estan en el plugin?
I don't speak Spanish sorry
On 16 Feb 2015, at 17:58, Luis Ruiz notifications@github.com wrote:
para utilizar esta librería tengo que hacer referencia a todos los javascrit que estan en el plugin?
— Reply to this email directly or view it on GitHub.
now it is showing the calendar , just not functioning buttons , month, day , year or next buttons . I thought it might be the lack of reference in the index of mwcalendar files, js , mwcalendarday , but if I add this error.
Solucionado.
I followed the steps in integrating install my app, but failed to work, I do more?