body height is cut-off
See original GitHub issueHi, 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
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>AdminLTE 2 | Starter</title> <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css"> <link rel="stylesheet" href="dist/css/AdminLTE.min.css"> <link rel="stylesheet" href="dist/css/skins/skin-blue.min.css"> </head> <body class="hold-transition skin-blue sidebar-mini"><!-- ANGULAR 2 -->
<script src="https://code.angularjs.org/tools/system.js"></script>
<script src="https://code.angularjs.org/tools/typescript.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.17/angular2-polyfills.min.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.17/Rx.min.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.17/angular2.min.js"></script>
<script src="https://code.angularjs.org/2.0.0-beta.17/http.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.35.0/es6-shim.min.js"></script>
<script>
System.config({
transpiler: 'typescript',
typescriptOptions: { emitDecoratorMetadata: true },
packages: { 'app': { defaultExtension: 'ts' } }
});
System.import('./app/boot').catch(console.log.bind(console));
</script>
<!-- ./ANGULAR 2 -->
<!-- REQUIRED JS SCRIPTS -->
<!-- jQuery 2.2.0 -->
<script src="plugins/jQuery/jQuery-2.2.0.min.js"></script>
<!-- Bootstrap 3.3.6 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/app.min.js"></script>
<!-- Optionally, you can add Slimscroll and FastClick plugins.
Both of these plugins are recommended to enhance the
user experience. Slimscroll is required when using the
fixed layout. -->
<app>Loading...</app>
</body>
</html>
app.html
<div class="wrapper"> ... cut-off the entire code for brevitytsconfig.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
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (2 by maintainers)
Top GitHub Comments
Hey @marvinvperez,
Update app.ts like this:
You’re welcome, Marvin 😄
Here is the full initialization of AdminLTE, copied from app.js. You can choose the needed parts.