Skip to content

Commit d74e44c

Browse files
author
Rahul Kumar
committed
added inline template
1 parent fbf5d2f commit d74e44c

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "ng2-fab-speed-dial",
3-
"version": "1.0.0",
3+
"version": "1.0.0-beta.5",
44
"author": "Rahul Kumar",
55
"description": "Fab speed dial in for Angular 4+",
66
"license": "MIT",
77
"scripts": {
8-
"transpile": "ngc",
8+
"transpile": "ngc -p tsconfig.json",
99
"package": "rollup -c",
1010
"minify": "uglifyjs dist/bundles/fabSpeedDial.umd.js --screw-ie8 --compress --mangle --comments --output dist/bundles/fabSpeedDial.umd.min.js",
1111
"build": "npm run transpile && npm run package && npm run minify"

src/fabSpeedDial/fabSpeedDial.component.ts

+25-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,31 @@ export class FabToggleDirective {}
2929

3030
@Component({
3131
selector: 'fab-speed-dial',
32-
templateUrl : './fabSpeedDial.component.html',
33-
styleUrls : ['./fabSpeedDial.component.scss']
32+
template : `
33+
<div class="fab-menu">
34+
<ng-content></ng-content>
35+
</div>
36+
`,
37+
styles : [`
38+
.fab-menu {
39+
position: relative;
40+
display: inline-block;
41+
}
42+
43+
.fab-menu ::ng-deep .fab-button {
44+
position: absolute;
45+
top: 0;
46+
left: 0;
47+
right: 0;
48+
bottom: 0;
49+
transition-timing-function: ease-out;
50+
transition-property: transform;
51+
}
52+
53+
.fab-menu ::ng-deep .fab-toggle {
54+
z-index: 2;
55+
}
56+
`]
3457
})
3558

3659
export class FabSpeedDialComponent implements AfterContentInit {

tsconfig.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"declaration": true,
55
"stripInternal": true,
66
"experimentalDecorators": true,
7+
"emitDecoratorMetadata": true,
78
"strictNullChecks": true,
89
"noImplicitAny": true,
910
"module": "es2015",
@@ -27,6 +28,8 @@
2728
"src/index.ts"
2829
],
2930
"angularCompilerOptions": {
30-
"strictMetadataEmit": true
31+
"strictMetadataEmit": true,
32+
"skipTemplateCodegen": true,
33+
"annotateForClosureCompiler": true
3134
}
3235
}

0 commit comments

Comments
 (0)