Loading README.md +20 −10 Original line number Diff line number Diff line Loading @@ -22,10 +22,13 @@ Add the package as a dependency to your project using: Add the CSS to your index.html: ```html <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> ``` Add the module to your app.module imports: ```typescript import { MentionModule } from 'angular-mentions/mention'; ... Loading @@ -33,14 +36,19 @@ Add the module to your app.module imports: imports: [ MentionModule ], ... }) ``` Add the `[mention]` directive to your input element: ```html <input type="text" [mention]="items"> ``` Where `items` is a string array of the items to suggest. For example: ```typescript items: string[] = ["Noah", "Liam", "Mason", "Jacob", ... ``` #### Configuration Options Loading @@ -56,7 +64,9 @@ The following optional configuration items can be used. For Example: ```html <input type="text" [mention]="items" [mentionConfig]="{triggerChar:'#',maxItems:10,labelKey:'name'}"> ``` #### Output Events Loading Loading
README.md +20 −10 Original line number Diff line number Diff line Loading @@ -22,10 +22,13 @@ Add the package as a dependency to your project using: Add the CSS to your index.html: ```html <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> ``` Add the module to your app.module imports: ```typescript import { MentionModule } from 'angular-mentions/mention'; ... Loading @@ -33,14 +36,19 @@ Add the module to your app.module imports: imports: [ MentionModule ], ... }) ``` Add the `[mention]` directive to your input element: ```html <input type="text" [mention]="items"> ``` Where `items` is a string array of the items to suggest. For example: ```typescript items: string[] = ["Noah", "Liam", "Mason", "Jacob", ... ``` #### Configuration Options Loading @@ -56,7 +64,9 @@ The following optional configuration items can be used. For Example: ```html <input type="text" [mention]="items" [mentionConfig]="{triggerChar:'#',maxItems:10,labelKey:'name'}"> ``` #### Output Events Loading