| Provider | Singleton | Instantiable | Configurable |
|---|---|---|---|
| Constant | Yes | No | No |
| Value | Yes | No | No |
| Service | Yes | No | No |
| Factory | Yes | Yes | No |
| Decorator | Yes | No? | No |
| Provider | Yes | Yes | Yes |
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
| <div ng-repeat="group in groups"> | |
| <li ng-repeat="friend in friends | filter:weDontLike(group.enemy.name)"> | |
| <span>{{friend.name}}</span> | |
| <li> | |
| </div> | |
| $scope.weDontLike = function(name) { | |
| return function(friend) { | |
| return friend.name != name; |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
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
| router.route('/:id/') | |
| .get((req, res) => { | |
| let id = req.params['id']; | |
| let filePath = undefined; | |
| $i18n.get_languages_codes() | |
| .then((languages) => { | |
| $news.get(id).then((news) => { | |
| if (news.picture) { | |
| filePath = path.join(__dirname, '..', '..', 'public', 'img_tmp', `${id}.${news.picture.extension}`); | |
| let res = fs.writeFileSync(filePath, news.picture.file.buffer); |
.vscode/settings.json updating following worked for me "javascript.implicitProjectConfig.experimentalDecorators": true
npm list -g --depth=0
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
| class EventEmitter { | |
| constructor() { | |
| this.events = {}; | |
| } | |
| emit(eventName, data) { | |
| const event = this.events[eventName]; | |
| if (event) { | |
| event.forEach(fn => { | |
| fn.call(null, data); |
First make soure the latest version of typescript installed. Second - add "src/app/app.module.ts" to tsconfig file.
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
| npm install --msvs_version=2015 |
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
| git pull origin master --allow-unrelated-histories |
OlderNewer