Skip to content

Commit

Permalink
feat(lib): add directives
Browse files Browse the repository at this point in the history
add view-mode and edit-mode directives
update tslint naming directive rules
  • Loading branch information
geromegrignon committed Jul 17, 2020
1 parent 0a8bad2 commit 5ad08af
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions projects/ngneat/edit-in-place/src/lib/edit-mode.directive.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Directive, TemplateRef } from '@angular/core';

@Directive({
selector: '[editMode]',
})
export class EditModeDirective {
constructor(public tpl: TemplateRef<any>) {}
}
8 changes: 8 additions & 0 deletions projects/ngneat/edit-in-place/src/lib/view-mode.directive.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Directive, TemplateRef } from '@angular/core';

@Directive({
selector: '[viewMode]',
})
export class ViewModeDirective {
constructor(public tpl: TemplateRef<any>) {}
}
2 changes: 1 addition & 1 deletion projects/ngneat/edit-in-place/tslint.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [true, "attribute", "lib", "camelCase"],
"directive-selector": [true, "attribute", "camelCase"],
"component-selector": [true, "element", "lib"]
}
}

0 comments on commit 5ad08af

Please sign in to comment.