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
package main | |
import "fmt" | |
func main() { | |
languages := []Language{ | |
Language{ID: 1, Name: "Javascript", Rating: 9}, | |
Language{ID: 2, Name: "Golang", Rating: 9}, | |
Language{ID: 3, Name: "Python", Rating: 8}, | |
Language{ID: 4, Name: "Rust", Rating: 8}, |
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
package main | |
import "fmt" | |
type Language struct { | |
ID int | |
Name string | |
Rating int | |
} |
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
const languages = [ | |
{ id: 1, name: 'Javascript', rating: 9 }, | |
{ id: 1, name: 'Golang', rating: 9 }, | |
{ id: 1, name: 'Python', rating: 8 }, | |
{ id: 1, name: 'Rust', rating: 8 }, | |
{ id: 1, name: 'C#', rating: 7 }, | |
{ id: 1, name: 'Java', rating: 5 } | |
]; | |
const bestLanguages = languages.filter(x => x.rating > 8).map(x => x.name); |
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
module: { | |
rules: [ | |
{ | |
test: /\.ts$/, | |
loader: ['awesome-typescript-loader', 'angular2-template-loader', 'ng-snippets-loader'], | |
exclude: [/node_modules\/(?!(ng2-.+))/], | |
}, | |
{ | |
test: /\.(html)$/, | |
loader: ['raw-loader', 'ng-snippets-loader'] |
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
---html,true | |
<ng-select [items]="items" | |
notFoundText="No results found" | |
typeToSearchText="Search for github account" | |
bindLabel="login" | |
[placeholder]="placeholder" | |
[multiple]="multiple" | |
[typeahead]="typeahead" | |
[(ngModel)]="githubAccount"> | |
<ng-template ng-option-tmp let-item="item"> |
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
<h3>Multiselect example with custom template and typeahead</h3> | |
<pre> | |
<code class="html"> | |
<ng-select [items]="items" | |
notFoundText="No results found" | |
typeToSearchText="Search for github account" | |
bindLabel="login" | |
[placeholder]="placeholder" | |
[multiple]="multiple" |
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
<pre> | |
<code class="html"> | |
<ng-select [items]="items" | |
notFoundText="No results found" | |
typeToSearchText="Search for github account" | |
bindLabel="login" | |
[placeholder]="placeholder" | |
[multiple]="multiple" | |
[typeahead]="typeahead" | |
[(ngModel)]="githubAccount"> |
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
$(document).ready(function() { | |
$('pre code').each(function(i, block) { | |
hljs.highlightBlock(block); | |
}); | |
}); |
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
<pre> | |
<code class="html"> | |
<ng-select [items]="items" | |
notFoundText="No results found" | |
typeToSearchText="Search for github account" | |
bindLabel="login" | |
[placeholder]="placeholder" | |
[multiple]="multiple" | |
[typeahead]="typeahead" | |
[(ngModel)]="githubAccount"> |
NewerOlder