Create new Project in Angular-js - angularjs

I am new to AngularJs. I want to create a new project in angular-js . So , How can i create it using command prompt ?
I have tried ng new myProject. But it is giving some error like
ng new myProject
? Select project blueprint: (Use arrow keys)
> Default template
Ui Router template
Your own template from git
How can i create it ?

Take a look at http://yeoman.io/ there are plenty of project template for angular.
You need node and npm for runn it

This are just options to choose.
You can choose between the Default Project Setup, a Setup with ui-router configured or you can provide some own template from git.
I you are new to Anggular you may should try the Default Template. This will give you some impressions on best practices and how to structure you application

Related

Symfony4 Override FosUserBundle Template

I'm following this : https://symfony.com/doc/current/bundles/FOSUserBundle/overriding_templates.html
I found the default template inside vendor/friendsofsymfony/user-bunfle/views/layout.html.twig
The documentation is then saying to place your new layout template at app/Resources/FOSUserBundle/views/layout.html.twig. Thing is, in Symfony4 there is nore more app folder I think. How should I do that then ? Thanks
You are right, and this is because the documentation is not updated for Symfony 4. What you need to do is copy all the templates files from vendor/friendsofsymfony/user-bundle/Resources/views and put them in a directory you create in /templates/bundles/FOSUserBundle. You can then edit the files in your newly created directory which will override the default templates.
In Symfony4, you can override it by placing your template in src/Resources/FOSUserBundle/views instead of templates/bundles/FOSUserBundle (yes, sadly not in templates directory)
In Symfony 4.4 the right place to override the FOSUserBundle templates is :
app/Ressources/FOSUserBundle/views
This work perfect in my project

Add AngularUI to Umbraco backoffice

I'm trying to add the AngularUI to use in the Umbraco backoffice, but i cant seem to get it working.
Can anyone shine some light to how should i achieve this?
You need to create a new package manifest file for this where you reference the AngularUI javascript file.
To do this, create a new folder under the App_Plugins folder called CustomBackoffice. There you put the Angular UI javascript file.
Then create a new file in this same folder called package.manifest and add following code:
{
javascript: [
'~/App_Plugins/CustomBackoffice/angular-ui.js'
]
}
See docs: https://our.umbraco.org/documentation/extending/property-editors/package-manifest

AngularJS in WebStorm

I am trying to build an application using d3js in WebStorm because I read that it is the best way to organize your AngularJS project.
However, when I start a new project, select AngularJS project there supposed to be a "hello world" example ready where you have your index.html pointing to view1 and then you click view2. But what happens in my case is that when I click run index.html view1 doesn't appear even when I click on the link leading to it or to view2.
Is there a configuration missing ? Do you know how I can correct that ?
Have you done a bower install to download all the dependencies your project needs ?

How to change the template from jade to html in angular meanstack project

When I was creating project using Yo angular fullstack, I was selected jade is template engin. But I want to change it to html. And I want change all jade file to html file. It is possible and How can, if it is possible.
Once you've finished generating the project through Yeoman there's no way to automatically switch everything back to html. You'll have to either create a new project from scratch with new settings or edit your current project's config files (Grunt, Karma, etc.) to no longer process the .jade files. Of course, you'll have to redo all of the Jade templates into HTML.
Personally, I would create a new project with HTML selected and, then, copy and paste any files from my old project that I needed to keep into my new project.

How to use EJS templates in a Backbone project generated by Yeoman?

Using yeoman init backbone:all generates the required files for a sample Backbone.JS app. Along with the MVC files for a sample application object, it also creates a folder at bbapp/app/scripts/templates with a sample ejs file called application.ejs. The Backbone View file for the sample application has a line (which is commented out):
//template: application
Uncommenting this does not work. It tries to look for an object with the name 'application' and throws an error: Uncaught ReferenceError: application is not defined. Using yeoman init bbb creates the Backbone Layout Manager which probably does the trick. Any ideas how I can use EJS files for templating in a project generated with yeoman init backbone:all ?
Thanks!
Till now the generator-backbone is not officially released for yeoman 1.0, but you can try it like this.
Today I proposed a fix for precompiling ejs templates.
That fix will precompile all the *.ejs files in app/templates to app/scripts/templates.js. Will update once the fix is merged to the master and the generator is officially released.
PS : In yeoman 1.0beta use yo backbone:all instead of yeoman init backbone:all

Resources