Unverified Commit 4eaa76cf authored by Dan MacFarlane's avatar Dan MacFarlane Committed by GitHub
Browse files

Merge pull request #75 from silentsnooc/patch-1

Added syntax highlighting to the README.
parents c383458c 7537e6bf
Loading
Loading
Loading
Loading
+20 −10
Original line number Diff line number Diff line
@@ -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';
...

@@ -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

@@ -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