<!DOCTYPE html>
<html>
<head>
<title>ngx-bootstrap plunkr</title>
<!-- Load common libraries -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/typescript/2.1.6/typescript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/zone.js/0.7.2/zone.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.47/system.js"></script>
<!-- Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System
.import('main.ts')
.catch(console.error.bind(console));
</script>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
<style>body { font-family: Roboto, Arial, sans-serif; margin: 0 }</style>
</head>
<body>
<ngx-app>Loading ngx-bootstrap...</ngx-app>
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->
</body>
</html>
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'ngx-app',
templateUrl: 'app.component.html'
})
export class AppComponent {
content:string ="this popover will show a content";
title:string="The rghtside of this popover needs a Xbutton× on the right hand corner, when press it will close it."
}
<alert type="success">
<strong>Well done!</strong> You successfully read this important alert message.
</alert>
<p>just some text</p>
<a [popover]= "popOverContent" container="body" #pop2="bs-popover" placement="right">
this popover need a x on top
</a>
<ng-template #popOverContent>
<button type="button" (click)='pop2.hide()' class="close" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<p>Popped content....asdasdasdasdasdasd.</p>
</ng-template>
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {AppComponent} from './app.component';
import {AlertModule, PopoverModule} from 'ngx-bootstrap'
@NgModule({
imports: [
BrowserModule,
CommonModule,
FormsModule,
AlertModule.forRoot(),
PopoverModule.forRoot()
],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class PlunkerNgxModule {}
platformBrowserDynamic().bootstrapModule(PlunkerNgxModule);
/*
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/
/** Add Transpiler for Typescript */
System.config({
transpiler: 'typescript',
typescriptOptions: {
emitDecoratorMetadata: true
},
packages: {
'.': {
defaultExtension: 'ts'
},
'vendor': {
defaultExtension: 'js'
}
}
});
System.config({
map: {
'main': 'main.js',
// Angular specific mappings.
'@angular/core': 'https://unpkg.com/@angular/core/bundles/core.umd.js',
'@angular/common': 'https://unpkg.com/@angular/common/bundles/common.umd.js',
'@angular/compiler': 'https://unpkg.com/@angular/compiler/bundles/compiler.umd.js',
'@angular/forms': 'https://unpkg.com/@angular/forms/bundles/forms.umd.js',
'@angular/platform-browser': 'https://unpkg.com/@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'https://unpkg.com/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
// Third party libraries
'tslib': 'https://unpkg.com/tslib@1.7.1',
'rxjs': 'https://unpkg.com/rxjs',
'ngx-bootstrap': 'https://unpkg.com/ngx-bootstrap/bundles/ngx-bootstrap.umd.min.js'
},
packages: {
// Thirdparty barrels.
'rxjs': { main: 'index' },
}
});
/*
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/