Created
August 11, 2015 12:09
-
-
Save julianjelfs/fc21c471b5e182769c54 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| $http.get('url').then(notifications => { | |
| return _.map(notifications, n => { | |
| let templates = { | |
| 1 : `/desktop/${n.Name}/${n.SomeId}`, | |
| 2 : `/desktop/${n.Whatever}/${n.SomethingElse}` | |
| }; | |
| return { | |
| text : n.Text, | |
| route : templates[n.Type] | |
| } | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment