-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
body height is cut-off #1033
Comments
Additional note: I use VS 2015 to edit the project and save the solution "AdminLTE.sln", This way the tsconfig.json can be recognized in the project. |
Hey @marvinvperez, Update app.ts like this: import {Component, OnInit} from 'angular2/core';
declare var jQuery:any;
@Component({
selector: 'app',
templateUrl: 'app/app.html'
})
export class AppComponent implements OnInit {
ngOnInit() {
jQuery.AdminLTE.layout.activate();
}
} |
Hi @suvjunmd Thank you so much! Your solution save the day. This however do not fix the issue on side-bar-right menu. The "gear" icon on the top-right of the page. The toggle is not working too. This is minor as I may remove that "gear" link, but it would be great if the toggle works too. I updated the fork. Cheers, |
You're welcome, Marvin 😄 Here is the full initialization of AdminLTE, copied from app.js. You can choose the needed parts. import {Component, OnInit} from 'angular2/core';
declare var $:any;
declare var FastClick:any;
@Component({
selector: 'app',
templateUrl: 'app/app.html'
})
export class AppComponent implements OnInit {
ngOnInit() {
//Easy access to options
var o = $.AdminLTE.options;
//Activate the layout maker
$.AdminLTE.layout.activate();
//Enable sidebar tree view controls
$.AdminLTE.tree('.sidebar');
//Enable control sidebar
if (o.enableControlSidebar) {
$.AdminLTE.controlSidebar.activate();
}
//Add slimscroll to navbar dropdown
if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
$(".navbar .menu").slimscroll({
height: o.navbarMenuHeight,
alwaysVisible: false,
size: o.navbarMenuSlimscrollWidth
}).css("width", "100%");
}
//Activate Bootstrap tooltip
if (o.enableBSToppltip) {
$('body').tooltip({
selector: o.BSTooltipSelector
});
}
//Activate box widget
if (o.enableBoxWidget) {
$.AdminLTE.boxWidget.activate();
}
//Activate fast click
if (o.enableFastclick && typeof FastClick != 'undefined') {
FastClick.attach(document.body);
}
//Activate direct chat widget
if (o.directChat.enable) {
$(document).on('click', o.directChat.contactToggleSelector, function () {
var box = $(this).parents('.direct-chat').first();
box.toggleClass('direct-chat-contacts-open');
});
}
}
} |
Truly appreciate your help @suvjunmd! |
Hi, I've tried the solutions in angular 2. I've tried to debug, and the undefined value is on layout $.AdminLTE.layout.activate(); |
Hi @suvjunmd ,
I get the following error |
Hi @praditha did you find any solution? |
figured this out |
Hi @nankathi , here is my project structure folder
And I tried to activate the layout like this on
Is it because I'm wrong to pointing the |
Hi @praditha |
@praditha for angular 4 I've found a solution for min-height problem. Place this code on your component.ts
|
@deio89 I try with I had your code in every component (I put a service with your fix) I tried with |
@marvinvperez
do you have some solution? |
in v2.4 $.AdminLTE is invalid, any update here? |
Change ngOnInit by this:
|
|
Finally i fixe the problem by adding this to component : |
@boussoufiane thank you that worked for my case but how about the sidebars. Or where I can find those jquery functions? |
Hi,
First of all this is awesome template! I'm trying to see how this well works with angular 2 and I successfully embed Angular 2/Typescript using the starter.html _(copied to starter_angular2.html). However, I have an issue on the height as it is not resizing to the size of the current screen. It seems the content-wrapper is not resizing. Not really sure if it was content-wrapper or somewhere else.
Basically, I stripped-off the entire
<div class="wrapper">
and put in "app.html" in the new folder called "app". The starter_angular2.hml is now including the Angular 2 required scripts. Also, under the app folder, I've added the app.ts and boot.ts. For anyone new to typescript, this will automatically create the javascript files when you save the changes to your typescript file.So the final modification and folder structure are -
Folder structure -
app.ts
import {Component} from 'angular2/core';
@component({
selector: 'app',
templateUrl: 'app/app.html'
})
export class AppComponent {
}
boot.ts
import {bootstrap} from 'angular2/platform/browser';
import {AppComponent} from './app';
bootstrap(AppComponent);
starter_angular2.html
<title>AdminLTE 2 | Starter</title>app.html
tsconfig.json
{
"compilerOptions": {
"target": "es6",
"module": "system",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"removeComments": false,
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true
},
"exclude": [
"node_modules",
"wwwroot"
]
}
Please see the changes in my fork. Also, I think we can add the template I've written to main branch so others who wants a working template for angular 2 can benefit from it.
Output screen:
Cheers,
marvin
The text was updated successfully, but these errors were encountered: