-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd3c388
commit 275be2a
Showing
7 changed files
with
46 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
import { Controller, Get, EntityRepository } from 'nger-core' | ||
import { Controller, Get } from 'nger-core' | ||
import { UserEntity } from '../typeorm/entities/user.entry' | ||
@Controller({ | ||
path: '/' | ||
}) | ||
export class ImsDemo2Controller { | ||
|
||
@EntityRepository() | ||
user: EntityRepository<UserEntity> | ||
|
||
@Get() | ||
userInfo(user: UserEntity) { | ||
this.user.save(user); | ||
} | ||
userInfo(user: UserEntity) { } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Directive, Input } from 'nger-core'; | ||
|
||
/** | ||
* *ngIf=" | ||
* condiction; | ||
* elseIf condiction2 template2; | ||
* elseIf condiction3 template3; | ||
* else template4; | ||
* " | ||
*/ | ||
|
||
@Directive({ | ||
selector: `[ngIf]` | ||
}) | ||
export class NgerNgIf { | ||
@Input() | ||
ngIf: boolean; | ||
|
||
@Input() | ||
ngIfElseIf: boolean; | ||
|
||
@Input() | ||
ngIfElse: boolean; | ||
|
||
@Input() | ||
ngIfThen: boolean; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,10 @@ | |
[style.backgroundColor]="bgColor"> | ||
demo | ||
</div> | ||
|
||
<!-- 自定义指令 --> | ||
|
||
<div *ngIf="condiction;else template3;"> | ||
|
||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters